From 9ec0f527275226c9f70d6a042f2e64374cca374b Mon Sep 17 00:00:00 2001 From: Charles Billette Date: Tue, 3 Sep 2024 12:57:49 -0400 Subject: [PATCH] add support for MapCreate burn --- data/pb/hivemapper/v1/hivemapper.pb.go | 303 +++++++++++------- data/psql.go | 20 ++ data/sinker.go | 4 + data/sql.go | 6 + .../models/example/dbt_mint_per_month.sql | 7 + proto/buf.lock | 4 +- 6 files changed, 229 insertions(+), 115 deletions(-) create mode 100644 dbt/hivemapper/models/example/dbt_mint_per_month.sql diff --git a/data/pb/hivemapper/v1/hivemapper.pb.go b/data/pb/hivemapper/v1/hivemapper.pb.go index 45a7856..22c78b3 100644 --- a/data/pb/hivemapper/v1/hivemapper.pb.go +++ b/data/pb/hivemapper/v1/hivemapper.pb.go @@ -31,6 +31,7 @@ type Output struct { AiTrainerPayments []*AiTrainerPayment `protobuf:"bytes,50,rep,name=ai_trainer_payments,json=aiTrainerPayments,proto3" json:"ai_trainer_payments,omitempty"` OperationalPayments []*OperationalPayment `protobuf:"bytes,51,rep,name=operational_payments,json=operationalPayments,proto3" json:"operational_payments,omitempty"` RewardPayments []*RewardPayment `protobuf:"bytes,52,rep,name=reward_payments,json=rewardPayments,proto3" json:"reward_payments,omitempty"` + MapCreate []*MapCreate `protobuf:"bytes,53,rep,name=map_create,json=mapCreate,proto3" json:"map_create,omitempty"` Transfers []*Transfer `protobuf:"bytes,60,rep,name=transfers,proto3" json:"transfers,omitempty"` Mints []*Mint `protobuf:"bytes,70,rep,name=mints,proto3" json:"mints,omitempty"` Burns []*Burn `protobuf:"bytes,80,rep,name=burns,proto3" json:"burns,omitempty"` @@ -111,6 +112,13 @@ func (x *Output) GetRewardPayments() []*RewardPayment { return nil } +func (x *Output) GetMapCreate() []*MapCreate { + if x != nil { + return x.MapCreate + } + return nil +} + func (x *Output) GetTransfers() []*Transfer { if x != nil { return x.Transfers @@ -476,6 +484,53 @@ func (x *RewardPayment) GetMint() *Mint { return nil } +type MapCreate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Burn *Burn `protobuf:"bytes,1,opt,name=burn,proto3" json:"burn,omitempty"` +} + +func (x *MapCreate) Reset() { + *x = MapCreate{} + if protoimpl.UnsafeEnabled { + mi := &file_hivemapper_v1_hivemapper_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MapCreate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MapCreate) ProtoMessage() {} + +func (x *MapCreate) ProtoReflect() protoreflect.Message { + mi := &file_hivemapper_v1_hivemapper_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MapCreate.ProtoReflect.Descriptor instead. +func (*MapCreate) Descriptor() ([]byte, []int) { + return file_hivemapper_v1_hivemapper_proto_rawDescGZIP(), []int{8} +} + +func (x *MapCreate) GetBurn() *Burn { + if x != nil { + return x.Burn + } + return nil +} + type Transfer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -491,7 +546,7 @@ type Transfer struct { func (x *Transfer) Reset() { *x = Transfer{} if protoimpl.UnsafeEnabled { - mi := &file_hivemapper_v1_hivemapper_proto_msgTypes[8] + mi := &file_hivemapper_v1_hivemapper_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -504,7 +559,7 @@ func (x *Transfer) String() string { func (*Transfer) ProtoMessage() {} func (x *Transfer) ProtoReflect() protoreflect.Message { - mi := &file_hivemapper_v1_hivemapper_proto_msgTypes[8] + mi := &file_hivemapper_v1_hivemapper_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -517,7 +572,7 @@ func (x *Transfer) ProtoReflect() protoreflect.Message { // Deprecated: Use Transfer.ProtoReflect.Descriptor instead. func (*Transfer) Descriptor() ([]byte, []int) { - return file_hivemapper_v1_hivemapper_proto_rawDescGZIP(), []int{8} + return file_hivemapper_v1_hivemapper_proto_rawDescGZIP(), []int{9} } func (x *Transfer) GetTrxHash() string { @@ -569,7 +624,7 @@ type Mint struct { func (x *Mint) Reset() { *x = Mint{} if protoimpl.UnsafeEnabled { - mi := &file_hivemapper_v1_hivemapper_proto_msgTypes[9] + mi := &file_hivemapper_v1_hivemapper_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -582,7 +637,7 @@ func (x *Mint) String() string { func (*Mint) ProtoMessage() {} func (x *Mint) ProtoReflect() protoreflect.Message { - mi := &file_hivemapper_v1_hivemapper_proto_msgTypes[9] + mi := &file_hivemapper_v1_hivemapper_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -595,7 +650,7 @@ func (x *Mint) ProtoReflect() protoreflect.Message { // Deprecated: Use Mint.ProtoReflect.Descriptor instead. func (*Mint) Descriptor() ([]byte, []int) { - return file_hivemapper_v1_hivemapper_proto_rawDescGZIP(), []int{9} + return file_hivemapper_v1_hivemapper_proto_rawDescGZIP(), []int{10} } func (x *Mint) GetTrxHash() string { @@ -640,7 +695,7 @@ type Burn struct { func (x *Burn) Reset() { *x = Burn{} if protoimpl.UnsafeEnabled { - mi := &file_hivemapper_v1_hivemapper_proto_msgTypes[10] + mi := &file_hivemapper_v1_hivemapper_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -653,7 +708,7 @@ func (x *Burn) String() string { func (*Burn) ProtoMessage() {} func (x *Burn) ProtoReflect() protoreflect.Message { - mi := &file_hivemapper_v1_hivemapper_proto_msgTypes[10] + mi := &file_hivemapper_v1_hivemapper_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -666,7 +721,7 @@ func (x *Burn) ProtoReflect() protoreflect.Message { // Deprecated: Use Burn.ProtoReflect.Descriptor instead. func (*Burn) Descriptor() ([]byte, []int) { - return file_hivemapper_v1_hivemapper_proto_rawDescGZIP(), []int{10} + return file_hivemapper_v1_hivemapper_proto_rawDescGZIP(), []int{11} } func (x *Burn) GetTrxHash() string { @@ -711,7 +766,7 @@ type InitializedAccount struct { func (x *InitializedAccount) Reset() { *x = InitializedAccount{} if protoimpl.UnsafeEnabled { - mi := &file_hivemapper_v1_hivemapper_proto_msgTypes[11] + mi := &file_hivemapper_v1_hivemapper_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -724,7 +779,7 @@ func (x *InitializedAccount) String() string { func (*InitializedAccount) ProtoMessage() {} func (x *InitializedAccount) ProtoReflect() protoreflect.Message { - mi := &file_hivemapper_v1_hivemapper_proto_msgTypes[11] + mi := &file_hivemapper_v1_hivemapper_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -737,7 +792,7 @@ func (x *InitializedAccount) ProtoReflect() protoreflect.Message { // Deprecated: Use InitializedAccount.ProtoReflect.Descriptor instead. func (*InitializedAccount) Descriptor() ([]byte, []int) { - return file_hivemapper_v1_hivemapper_proto_rawDescGZIP(), []int{11} + return file_hivemapper_v1_hivemapper_proto_rawDescGZIP(), []int{12} } func (x *InitializedAccount) GetTrxHash() string { @@ -774,7 +829,7 @@ var file_hivemapper_v1_hivemapper_proto_rawDesc = []byte{ 0x0a, 0x1e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x22, 0x9b, 0x06, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x22, 0xda, 0x06, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x64, 0x0a, 0x18, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, @@ -808,86 +863,93 @@ var file_hivemapper_v1_hivemapper_proto_rawDesc = []byte{ 0x18, 0x34, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x72, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x18, 0x3c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x09, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x74, 0x73, - 0x18, 0x46, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, - 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x6e, - 0x74, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x62, 0x75, 0x72, 0x6e, - 0x73, 0x18, 0x50, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, - 0x72, 0x6e, 0x52, 0x05, 0x62, 0x75, 0x72, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x13, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x78, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, - 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x69, - 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, - 0x12, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x15, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x70, 0x6c, - 0x69, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, - 0x0c, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x6d, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x0b, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x4d, 0x69, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x0b, 0x64, - 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x6d, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x64, 0x72, 0x69, - 0x76, 0x65, 0x72, 0x4d, 0x69, 0x6e, 0x74, 0x22, 0x45, 0x0a, 0x14, 0x52, 0x65, 0x67, 0x75, 0x6c, - 0x61, 0x72, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x72, 0x64, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x6d, 0x61, + 0x70, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x18, 0x35, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x09, + 0x6d, 0x61, 0x70, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x18, 0x3c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x68, + 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x09, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x74, 0x73, 0x18, + 0x46, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, + 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x6e, 0x74, + 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x62, 0x75, 0x72, 0x6e, 0x73, + 0x18, 0x50, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, + 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x72, + 0x6e, 0x52, 0x05, 0x62, 0x75, 0x72, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x13, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x78, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, + 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x12, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x15, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x70, 0x6c, 0x69, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x0c, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x6d, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x0b, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x4d, 0x69, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x0b, 0x64, 0x72, + 0x69, 0x76, 0x65, 0x72, 0x5f, 0x6d, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x64, 0x72, 0x69, 0x76, + 0x65, 0x72, 0x4d, 0x69, 0x6e, 0x74, 0x22, 0x45, 0x0a, 0x14, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, + 0x72, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2d, + 0x0a, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, + 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x22, 0x3f, 0x0a, + 0x0e, 0x4e, 0x6f, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x22, 0x3f, - 0x0a, 0x0e, 0x4e, 0x6f, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x2d, 0x0a, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x22, - 0x41, 0x0a, 0x10, 0x41, 0x69, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x6d, 0x69, - 0x6e, 0x74, 0x22, 0x43, 0x0a, 0x12, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x6d, 0x69, 0x6e, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, - 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x6e, - 0x74, 0x52, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x22, 0x38, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x6d, 0x69, 0x6e, - 0x74, 0x22, 0x3e, 0x0a, 0x0d, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x50, 0x61, 0x79, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x22, 0x41, + 0x0a, 0x10, 0x41, 0x69, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x6d, 0x69, 0x6e, - 0x74, 0x22, 0x7f, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x19, 0x0a, - 0x08, 0x74, 0x72, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x74, 0x72, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x22, 0x67, 0x0a, 0x04, 0x4d, 0x69, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, - 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, - 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x6b, 0x0a, 0x04, 0x42, - 0x75, 0x72, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1c, - 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, - 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, - 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, - 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x73, 0x0a, 0x12, 0x49, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, + 0x74, 0x22, 0x43, 0x0a, 0x12, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, + 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x6e, 0x74, + 0x52, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x22, 0x38, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x6d, 0x69, 0x6e, 0x74, + 0x22, 0x3e, 0x0a, 0x0d, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x68, 0x69, 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x6d, 0x69, 0x6e, 0x74, + 0x22, 0x3a, 0x0a, 0x09, 0x4d, 0x61, 0x70, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x0a, + 0x04, 0x62, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x69, + 0x76, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x42, 0x75, 0x72, 0x6e, 0x52, 0x04, 0x62, 0x75, 0x72, 0x6e, 0x22, 0x7f, 0x0a, 0x08, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x78, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x78, 0x48, + 0x61, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x67, 0x0a, + 0x04, 0x4d, 0x69, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x78, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x78, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x0e, + 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x16, + 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x6b, 0x0a, 0x04, 0x42, 0x75, 0x72, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x74, 0x72, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x07, 0x74, 0x72, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0x73, 0x0a, 0x12, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x78, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x78, + 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x69, + 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -902,7 +964,7 @@ func file_hivemapper_v1_hivemapper_proto_rawDescGZIP() []byte { return file_hivemapper_v1_hivemapper_proto_rawDescData } -var file_hivemapper_v1_hivemapper_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_hivemapper_v1_hivemapper_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_hivemapper_v1_hivemapper_proto_goTypes = []interface{}{ (*Output)(nil), // 0: hivemapper.types.v1.Output (*TokenSplittingPayment)(nil), // 1: hivemapper.types.v1.TokenSplittingPayment @@ -912,10 +974,11 @@ var file_hivemapper_v1_hivemapper_proto_goTypes = []interface{}{ (*OperationalPayment)(nil), // 5: hivemapper.types.v1.OperationalPayment (*Payment)(nil), // 6: hivemapper.types.v1.Payment (*RewardPayment)(nil), // 7: hivemapper.types.v1.RewardPayment - (*Transfer)(nil), // 8: hivemapper.types.v1.Transfer - (*Mint)(nil), // 9: hivemapper.types.v1.Mint - (*Burn)(nil), // 10: hivemapper.types.v1.Burn - (*InitializedAccount)(nil), // 11: hivemapper.types.v1.InitializedAccount + (*MapCreate)(nil), // 8: hivemapper.types.v1.MapCreate + (*Transfer)(nil), // 9: hivemapper.types.v1.Transfer + (*Mint)(nil), // 10: hivemapper.types.v1.Mint + (*Burn)(nil), // 11: hivemapper.types.v1.Burn + (*InitializedAccount)(nil), // 12: hivemapper.types.v1.InitializedAccount } var file_hivemapper_v1_hivemapper_proto_depIdxs = []int32{ 1, // 0: hivemapper.types.v1.Output.token_splitting_payments:type_name -> hivemapper.types.v1.TokenSplittingPayment @@ -924,23 +987,25 @@ var file_hivemapper_v1_hivemapper_proto_depIdxs = []int32{ 4, // 3: hivemapper.types.v1.Output.ai_trainer_payments:type_name -> hivemapper.types.v1.AiTrainerPayment 5, // 4: hivemapper.types.v1.Output.operational_payments:type_name -> hivemapper.types.v1.OperationalPayment 7, // 5: hivemapper.types.v1.Output.reward_payments:type_name -> hivemapper.types.v1.RewardPayment - 8, // 6: hivemapper.types.v1.Output.transfers:type_name -> hivemapper.types.v1.Transfer - 9, // 7: hivemapper.types.v1.Output.mints:type_name -> hivemapper.types.v1.Mint - 10, // 8: hivemapper.types.v1.Output.burns:type_name -> hivemapper.types.v1.Burn - 11, // 9: hivemapper.types.v1.Output.initialized_account:type_name -> hivemapper.types.v1.InitializedAccount - 9, // 10: hivemapper.types.v1.TokenSplittingPayment.manager_mint:type_name -> hivemapper.types.v1.Mint - 9, // 11: hivemapper.types.v1.TokenSplittingPayment.driver_mint:type_name -> hivemapper.types.v1.Mint - 9, // 12: hivemapper.types.v1.RegularDriverPayment.mint:type_name -> hivemapper.types.v1.Mint - 9, // 13: hivemapper.types.v1.NoSplitPayment.mint:type_name -> hivemapper.types.v1.Mint - 9, // 14: hivemapper.types.v1.AiTrainerPayment.mint:type_name -> hivemapper.types.v1.Mint - 9, // 15: hivemapper.types.v1.OperationalPayment.mint:type_name -> hivemapper.types.v1.Mint - 9, // 16: hivemapper.types.v1.Payment.mint:type_name -> hivemapper.types.v1.Mint - 9, // 17: hivemapper.types.v1.RewardPayment.mint:type_name -> hivemapper.types.v1.Mint - 18, // [18:18] is the sub-list for method output_type - 18, // [18:18] is the sub-list for method input_type - 18, // [18:18] is the sub-list for extension type_name - 18, // [18:18] is the sub-list for extension extendee - 0, // [0:18] is the sub-list for field type_name + 8, // 6: hivemapper.types.v1.Output.map_create:type_name -> hivemapper.types.v1.MapCreate + 9, // 7: hivemapper.types.v1.Output.transfers:type_name -> hivemapper.types.v1.Transfer + 10, // 8: hivemapper.types.v1.Output.mints:type_name -> hivemapper.types.v1.Mint + 11, // 9: hivemapper.types.v1.Output.burns:type_name -> hivemapper.types.v1.Burn + 12, // 10: hivemapper.types.v1.Output.initialized_account:type_name -> hivemapper.types.v1.InitializedAccount + 10, // 11: hivemapper.types.v1.TokenSplittingPayment.manager_mint:type_name -> hivemapper.types.v1.Mint + 10, // 12: hivemapper.types.v1.TokenSplittingPayment.driver_mint:type_name -> hivemapper.types.v1.Mint + 10, // 13: hivemapper.types.v1.RegularDriverPayment.mint:type_name -> hivemapper.types.v1.Mint + 10, // 14: hivemapper.types.v1.NoSplitPayment.mint:type_name -> hivemapper.types.v1.Mint + 10, // 15: hivemapper.types.v1.AiTrainerPayment.mint:type_name -> hivemapper.types.v1.Mint + 10, // 16: hivemapper.types.v1.OperationalPayment.mint:type_name -> hivemapper.types.v1.Mint + 10, // 17: hivemapper.types.v1.Payment.mint:type_name -> hivemapper.types.v1.Mint + 10, // 18: hivemapper.types.v1.RewardPayment.mint:type_name -> hivemapper.types.v1.Mint + 11, // 19: hivemapper.types.v1.MapCreate.burn:type_name -> hivemapper.types.v1.Burn + 20, // [20:20] is the sub-list for method output_type + 20, // [20:20] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_hivemapper_v1_hivemapper_proto_init() } @@ -1046,7 +1111,7 @@ func file_hivemapper_v1_hivemapper_proto_init() { } } file_hivemapper_v1_hivemapper_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Transfer); i { + switch v := v.(*MapCreate); i { case 0: return &v.state case 1: @@ -1058,7 +1123,7 @@ func file_hivemapper_v1_hivemapper_proto_init() { } } file_hivemapper_v1_hivemapper_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Mint); i { + switch v := v.(*Transfer); i { case 0: return &v.state case 1: @@ -1070,7 +1135,7 @@ func file_hivemapper_v1_hivemapper_proto_init() { } } file_hivemapper_v1_hivemapper_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Burn); i { + switch v := v.(*Mint); i { case 0: return &v.state case 1: @@ -1082,6 +1147,18 @@ func file_hivemapper_v1_hivemapper_proto_init() { } } file_hivemapper_v1_hivemapper_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Burn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hivemapper_v1_hivemapper_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InitializedAccount); i { case 0: return &v.state @@ -1100,7 +1177,7 @@ func file_hivemapper_v1_hivemapper_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_hivemapper_v1_hivemapper_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 13, NumExtensions: 0, NumServices: 0, }, diff --git a/data/psql.go b/data/psql.go index 121f486..5ae75cf 100644 --- a/data/psql.go +++ b/data/psql.go @@ -394,6 +394,26 @@ func (p *Psql) HandleRewardPayments(dbBlockID int64, payments []*pb.RewardPaymen return nil } +func (p *Psql) HandleMapCreate(dbBlockID int64, payments []*pb.MapCreate) error { + for _, payment := range payments { + dbTransactionID, err := p.handleTransaction(dbBlockID, payment.Burn.TrxHash) + if err != nil { + return fmt.Errorf("inserting transaction: %w", err) + } + + burnDbID, err := p.insertBurns(dbTransactionID, payment.Burn) + if err != nil { + return fmt.Errorf("inserting mint: %w", err) + } + + _, err = p.tx.Exec("INSERT INTO hivemapper.map_create (burn_id) VALUES ($1) RETURNING id", burnDbID) + if err != nil { + return fmt.Errorf("inserting reward_payments: %w", err) + } + } + + return nil +} func (p *Psql) insertBurns(dbTransactionID int64, burn *pb.Burn) (dbMintID int64, err error) { row := p.tx.QueryRow("INSERT INTO hivemapper.burns (transaction_id, from_address, amount) VALUES ($1, $2, $3) RETURNING id", dbTransactionID, burn.From, burn.Amount) diff --git a/data/sinker.go b/data/sinker.go index 431558d..17bfb96 100644 --- a/data/sinker.go +++ b/data/sinker.go @@ -128,6 +128,10 @@ func (s *Sinker) HandleBlockScopedData(ctx context.Context, data *pbsubstreamsrp return fmt.Errorf("handle HandleRewardPayments: %w", err) } + if err := s.db.HandleMapCreate(dbBlockID, moduleOutput.MapCreate); err != nil { + return fmt.Errorf("handle HandleMapCreate: %w", err) + } + if err := s.db.HandleSplitPayments(dbBlockID, moduleOutput.TokenSplittingPayments); err != nil { return fmt.Errorf("handle split payments: %w", err) } diff --git a/data/sql.go b/data/sql.go index 4988718..653b372 100644 --- a/data/sql.go +++ b/data/sql.go @@ -67,6 +67,12 @@ CREATE TABLE IF NOT EXISTS hivemapper.payments ( CONSTRAINT fk_mint FOREIGN KEY (mint_id) REFERENCES hivemapper.mints(id) ); +CREATE TABLE IF NOT EXISTS hivemapper.map_create ( + id SERIAL PRIMARY KEY, + burn_id INTEGER NOT NULL, + CONSTRAINT fk_mint FOREIGN KEY (burn_id) REFERENCES hivemapper.burns(id) +); + CREATE TABLE IF NOT EXISTS hivemapper.ai_payments ( id SERIAL PRIMARY KEY, mint_id INTEGER NOT NULL, diff --git a/dbt/hivemapper/models/example/dbt_mint_per_month.sql b/dbt/hivemapper/models/example/dbt_mint_per_month.sql new file mode 100644 index 0000000..7f7ac38 --- /dev/null +++ b/dbt/hivemapper/models/example/dbt_mint_per_month.sql @@ -0,0 +1,7 @@ +{{ config(materialized='table') }} + +select DATE_TRUNC('month', b.timestamp) as month, COALESCE(SUM(br.amount), 0) as total +from hivemapper.mints br +inner join hivemapper.transactions t on t.id = br.transaction_id +inner join hivemapper.blocks b on b.id = t.block_id +group by DATE_TRUNC('month', b.timestamp) \ No newline at end of file diff --git a/proto/buf.lock b/proto/buf.lock index 6bc8db9..6bd7c85 100644 --- a/proto/buf.lock +++ b/proto/buf.lock @@ -4,5 +4,5 @@ deps: - remote: buf.build owner: streamingfast repository: hivemapper - commit: 0acc9cdb55ff4ac9970272514acc3ebc - digest: shake256:2d67b2a28df875fccfdd0c4db36971be72ccbaa4c889932618f9550c2129e3a355f1099bc29c2952e7e83d0dc8afcaa741785f84d1055400b1e045a4da5db332 + commit: 9eceba3b1aa44864aa4e9d415dec10e2 + digest: shake256:2d49d9e45b354fc3020053c30537f44e59160b688a62bcbef6fb13d03e8893aaeac155b596e31afd81486e863f06406792bf3208e26b6b4cef96a96b15c97b5e