From 04f191e98a057bf14c097cd6186111b249796cb3 Mon Sep 17 00:00:00 2001 From: aliirns Date: Thu, 19 May 2022 18:41:28 +0500 Subject: [PATCH 1/5] added EventItemCreation: still under development --- .gitignore | 1 + go.mod | 12 +- go.sum | 17 +- proto/pylons/event.proto | 78 ++- x/pylons/keeper/msg_server_execute_recipe.go | 13 + x/pylons/types/event.pb.go | 666 ++++++++++++++++--- 6 files changed, 667 insertions(+), 120 deletions(-) diff --git a/.gitignore b/.gitignore index 910d4b6fdc..fe29b7f0ce 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ genesis/pylonsd artifacts +cmd/pylonsd/__debug_bin diff --git a/go.mod b/go.mod index 94d00cef92..51adcf2807 100644 --- a/go.mod +++ b/go.mod @@ -25,8 +25,8 @@ require ( github.com/tendermint/tendermint v0.34.14 github.com/tendermint/tm-db v0.6.4 github.com/zach-klippenstein/goregen v0.0.0-20160303162051-795b5e3961ea - google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa - google.golang.org/grpc v1.43.0 + google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e + google.golang.org/grpc v1.45.0 google.golang.org/protobuf v1.27.1 gopkg.in/yaml.v2 v2.4.0 ) @@ -68,7 +68,7 @@ require ( github.com/gogo/gateway v1.1.0 // indirect github.com/golang/snappy v0.0.3 // indirect github.com/google/btree v1.0.0 // indirect - github.com/google/go-cmp v0.5.6 // indirect + github.com/google/go-cmp v0.5.7 // indirect github.com/google/gxui v0.0.0-20151028112939-f85e0a97b3a4 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/gorilla/handlers v1.5.1 // indirect @@ -125,9 +125,9 @@ require ( github.com/zondax/hid v0.9.0 // indirect go.etcd.io/bbolt v1.3.5 // indirect golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect - golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f // indirect - golang.org/x/sys v0.0.0-20210903071746-97244b99971b // indirect - golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect + golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect + golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect + golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect gopkg.in/ini.v1 v1.63.2 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect diff --git a/go.sum b/go.sum index 55c6d36e23..2988e774e4 100644 --- a/go.sum +++ b/go.sum @@ -446,8 +446,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -1236,8 +1236,9 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f h1:w6wWR0H+nyVpbSAQbzVEIACVyr/h8l/BEkY6Sokc7Eg= golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1344,11 +1345,13 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210903071746-97244b99971b h1:3Dq0eVHn0uaQJmPO+/aYPI/fRMqdrVDbu7MQcku54gg= golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1554,8 +1557,8 @@ google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaE google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e h1:fNKDNuUyC4WH+inqDMpfXDdfvwfYILbsX+oskGZ8hxg= +google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/proto/pylons/event.proto b/proto/pylons/event.proto index 2c6d2e7cd1..6007e3fc05 100644 --- a/proto/pylons/event.proto +++ b/proto/pylons/event.proto @@ -15,7 +15,17 @@ import "pylons/payment_info.proto"; import "pylons/redeem_info.proto"; message EventBurnDebtToken { - RedeemInfo redeemInfo = 1 [(gogoproto.nullable) = false]; + RedeemInfo redeemInfo = 1 [ (gogoproto.nullable) = false ]; +} + +message EventItemCreation { + string itemID = 1; + string cookbookID = 2; + string recipeID = 3; + string createrName = 4; + string createrAddress = 5; + string recipientAddress = 6; + repeated PaymentInfo paymentInfos = 7 [ (gogoproto.nullable) = false ]; } message EventCreateAccount { @@ -33,9 +43,10 @@ message EventCreateCookbook { string ID = 2; } -// EventUpdateCookbook contains a record of the cookbook pre-update. The updated fields can be found by the message emitted by MsgUpdateCookbook +// EventUpdateCookbook contains a record of the cookbook pre-update. The +// updated fields can be found by the message emitted by MsgUpdateCookbook message EventUpdateCookbook { - Cookbook originalCookbook = 1 [(gogoproto.nullable) = false]; + Cookbook originalCookbook = 1 [ (gogoproto.nullable) = false ]; } message EventTransferCookbook { @@ -50,28 +61,45 @@ message EventCreateRecipe { string ID = 3; } -// EventUpdateRecipe contains a record of the recipe pre-update. The updated fields can be found by the message emitted by MsgUpdateRecipe +// EventUpdateRecipe contains a record of the recipe pre-update. The updated +// fields can be found by the message emitted by MsgUpdateRecipe message EventUpdateRecipe { - Recipe originalRecipe = 1 [(gogoproto.nullable) = false]; + Recipe originalRecipe = 1 [ (gogoproto.nullable) = false ]; } -// EventCreateExecution contains the creator and ID of a created execution. Execution IDs are of the form {count-targetBlockHeight} +// EventCreateExecution contains the creator and ID of a created execution. +// Execution IDs are of the form {count-targetBlockHeight} message EventCreateExecution { string creator = 1; string ID = 2; - repeated PaymentInfo paymentInfos = 3 [(gogoproto.nullable) = false]; + repeated PaymentInfo paymentInfos = 3 [ (gogoproto.nullable) = false ]; } message EventCompleteExecution { string creator = 1; string ID = 2; - repeated cosmos.base.v1beta1.Coin burnCoins = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - repeated cosmos.base.v1beta1.Coin payCoins = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - repeated cosmos.base.v1beta1.Coin transferCoins = 5 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - repeated cosmos.base.v1beta1.Coin feeCoins = 6 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - repeated cosmos.base.v1beta1.Coin coinOutputs = 7 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - repeated Item mintItems = 8 [(gogoproto.nullable) = false]; - repeated Item modifyItems = 9 [(gogoproto.nullable) = false]; + repeated cosmos.base.v1beta1.Coin burnCoins = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + repeated cosmos.base.v1beta1.Coin payCoins = 4 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + repeated cosmos.base.v1beta1.Coin transferCoins = 5 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + repeated cosmos.base.v1beta1.Coin feeCoins = 6 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + repeated cosmos.base.v1beta1.Coin coinOutputs = 7 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + repeated Item mintItems = 8 [ (gogoproto.nullable) = false ]; + repeated Item modifyItems = 9 [ (gogoproto.nullable) = false ]; } message EventDropExecution { @@ -87,14 +115,15 @@ message EventCompleteExecutionEarly { message EventSendItems { string sender = 1; string receiver = 2; - repeated ItemRef items = 3 [(gogoproto.nullable) = false]; + repeated ItemRef items = 3 [ (gogoproto.nullable) = false ]; } message EventSetItemString { string creator = 1; string CookbookID = 2; string ID = 3; - repeated StringKeyValue originalMutableStrings = 4 [(gogoproto.nullable) = false]; + repeated StringKeyValue originalMutableStrings = 4 + [ (gogoproto.nullable) = false ]; } message EventCreateTrade { @@ -111,11 +140,17 @@ message EventFulfillTrade { uint64 ID = 1; string creator = 2; string fulfiller = 3; - repeated ItemRef itemInputs = 4 [(gogoproto.nullable) = false]; - repeated cosmos.base.v1beta1.Coin coinInputs = 5 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - repeated ItemRef itemOutputs = 6 [(gogoproto.nullable) = false]; - repeated cosmos.base.v1beta1.Coin coinOutputs = 7 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - repeated PaymentInfo paymentInfos = 8 [(gogoproto.nullable) = false]; + repeated ItemRef itemInputs = 4 [ (gogoproto.nullable) = false ]; + repeated cosmos.base.v1beta1.Coin coinInputs = 5 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + repeated ItemRef itemOutputs = 6 [ (gogoproto.nullable) = false ]; + repeated cosmos.base.v1beta1.Coin coinOutputs = 7 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + repeated PaymentInfo paymentInfos = 8 [ (gogoproto.nullable) = false ]; } message EventGooglePurchase { @@ -130,4 +165,3 @@ message EventStripePurchase { string creator = 1; string ID = 2; } - diff --git a/x/pylons/keeper/msg_server_execute_recipe.go b/x/pylons/keeper/msg_server_execute_recipe.go index e5f9fff96e..670a87c4b4 100644 --- a/x/pylons/keeper/msg_server_execute_recipe.go +++ b/x/pylons/keeper/msg_server_execute_recipe.go @@ -163,5 +163,18 @@ func (k msgServer) ExecuteRecipe(goCtx context.Context, msg *types.MsgExecuteRec PaymentInfos: msg.PaymentInfos, }) + //to do + // creater NAme + // recipient address + err = ctx.EventManager().EmitTypedEvent(&types.EventItemCreation{ + ItemID: id, + CookbookID: recipe.CookbookID, + RecipeID: recipe.ID, + PaymentInfos: msg.PaymentInfos, + CreaterAddress: msg.Creator, + CreaterName: execution.Creator, + RecipientAddress: execution.Creator, + }) + return &types.MsgExecuteRecipeResponse{ID: id}, err } diff --git a/x/pylons/types/event.pb.go b/x/pylons/types/event.pb.go index 39f64bb7b3..47cb1dc544 100644 --- a/x/pylons/types/event.pb.go +++ b/x/pylons/types/event.pb.go @@ -69,6 +69,98 @@ func (m *EventBurnDebtToken) GetRedeemInfo() RedeemInfo { return RedeemInfo{} } +type EventItemCreation struct { + ItemID string `protobuf:"bytes,1,opt,name=itemID,proto3" json:"itemID,omitempty"` + CookbookID string `protobuf:"bytes,2,opt,name=cookbookID,proto3" json:"cookbookID,omitempty"` + RecipeID string `protobuf:"bytes,3,opt,name=recipeID,proto3" json:"recipeID,omitempty"` + CreaterName string `protobuf:"bytes,4,opt,name=createrName,proto3" json:"createrName,omitempty"` + CreaterAddress string `protobuf:"bytes,5,opt,name=createrAddress,proto3" json:"createrAddress,omitempty"` + RecipientAddress string `protobuf:"bytes,6,opt,name=recipientAddress,proto3" json:"recipientAddress,omitempty"` + PaymentInfos []PaymentInfo `protobuf:"bytes,7,rep,name=paymentInfos,proto3" json:"paymentInfos"` +} + +func (m *EventItemCreation) Reset() { *m = EventItemCreation{} } +func (m *EventItemCreation) String() string { return proto.CompactTextString(m) } +func (*EventItemCreation) ProtoMessage() {} +func (*EventItemCreation) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5fff376ba53ecd, []int{1} +} +func (m *EventItemCreation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventItemCreation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventItemCreation.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventItemCreation) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventItemCreation.Merge(m, src) +} +func (m *EventItemCreation) XXX_Size() int { + return m.Size() +} +func (m *EventItemCreation) XXX_DiscardUnknown() { + xxx_messageInfo_EventItemCreation.DiscardUnknown(m) +} + +var xxx_messageInfo_EventItemCreation proto.InternalMessageInfo + +func (m *EventItemCreation) GetItemID() string { + if m != nil { + return m.ItemID + } + return "" +} + +func (m *EventItemCreation) GetCookbookID() string { + if m != nil { + return m.CookbookID + } + return "" +} + +func (m *EventItemCreation) GetRecipeID() string { + if m != nil { + return m.RecipeID + } + return "" +} + +func (m *EventItemCreation) GetCreaterName() string { + if m != nil { + return m.CreaterName + } + return "" +} + +func (m *EventItemCreation) GetCreaterAddress() string { + if m != nil { + return m.CreaterAddress + } + return "" +} + +func (m *EventItemCreation) GetRecipientAddress() string { + if m != nil { + return m.RecipientAddress + } + return "" +} + +func (m *EventItemCreation) GetPaymentInfos() []PaymentInfo { + if m != nil { + return m.PaymentInfos + } + return nil +} + type EventCreateAccount struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` @@ -78,7 +170,7 @@ func (m *EventCreateAccount) Reset() { *m = EventCreateAccount{} } func (m *EventCreateAccount) String() string { return proto.CompactTextString(m) } func (*EventCreateAccount) ProtoMessage() {} func (*EventCreateAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{1} + return fileDescriptor_3d5fff376ba53ecd, []int{2} } func (m *EventCreateAccount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -130,7 +222,7 @@ func (m *EventUpdateAccount) Reset() { *m = EventUpdateAccount{} } func (m *EventUpdateAccount) String() string { return proto.CompactTextString(m) } func (*EventUpdateAccount) ProtoMessage() {} func (*EventUpdateAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{2} + return fileDescriptor_3d5fff376ba53ecd, []int{3} } func (m *EventUpdateAccount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -182,7 +274,7 @@ func (m *EventCreateCookbook) Reset() { *m = EventCreateCookbook{} } func (m *EventCreateCookbook) String() string { return proto.CompactTextString(m) } func (*EventCreateCookbook) ProtoMessage() {} func (*EventCreateCookbook) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{3} + return fileDescriptor_3d5fff376ba53ecd, []int{4} } func (m *EventCreateCookbook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -225,7 +317,8 @@ func (m *EventCreateCookbook) GetID() string { return "" } -// EventUpdateCookbook contains a record of the cookbook pre-update. The updated fields can be found by the message emitted by MsgUpdateCookbook +// EventUpdateCookbook contains a record of the cookbook pre-update. The +// updated fields can be found by the message emitted by MsgUpdateCookbook type EventUpdateCookbook struct { OriginalCookbook Cookbook `protobuf:"bytes,1,opt,name=originalCookbook,proto3" json:"originalCookbook"` } @@ -234,7 +327,7 @@ func (m *EventUpdateCookbook) Reset() { *m = EventUpdateCookbook{} } func (m *EventUpdateCookbook) String() string { return proto.CompactTextString(m) } func (*EventUpdateCookbook) ProtoMessage() {} func (*EventUpdateCookbook) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{4} + return fileDescriptor_3d5fff376ba53ecd, []int{5} } func (m *EventUpdateCookbook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -280,7 +373,7 @@ func (m *EventTransferCookbook) Reset() { *m = EventTransferCookbook{} } func (m *EventTransferCookbook) String() string { return proto.CompactTextString(m) } func (*EventTransferCookbook) ProtoMessage() {} func (*EventTransferCookbook) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{5} + return fileDescriptor_3d5fff376ba53ecd, []int{6} } func (m *EventTransferCookbook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -340,7 +433,7 @@ func (m *EventCreateRecipe) Reset() { *m = EventCreateRecipe{} } func (m *EventCreateRecipe) String() string { return proto.CompactTextString(m) } func (*EventCreateRecipe) ProtoMessage() {} func (*EventCreateRecipe) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{6} + return fileDescriptor_3d5fff376ba53ecd, []int{7} } func (m *EventCreateRecipe) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -390,7 +483,8 @@ func (m *EventCreateRecipe) GetID() string { return "" } -// EventUpdateRecipe contains a record of the recipe pre-update. The updated fields can be found by the message emitted by MsgUpdateRecipe +// EventUpdateRecipe contains a record of the recipe pre-update. The updated +// fields can be found by the message emitted by MsgUpdateRecipe type EventUpdateRecipe struct { OriginalRecipe Recipe `protobuf:"bytes,1,opt,name=originalRecipe,proto3" json:"originalRecipe"` } @@ -399,7 +493,7 @@ func (m *EventUpdateRecipe) Reset() { *m = EventUpdateRecipe{} } func (m *EventUpdateRecipe) String() string { return proto.CompactTextString(m) } func (*EventUpdateRecipe) ProtoMessage() {} func (*EventUpdateRecipe) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{7} + return fileDescriptor_3d5fff376ba53ecd, []int{8} } func (m *EventUpdateRecipe) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -435,7 +529,8 @@ func (m *EventUpdateRecipe) GetOriginalRecipe() Recipe { return Recipe{} } -// EventCreateExecution contains the creator and ID of a created execution. Execution IDs are of the form {count-targetBlockHeight} +// EventCreateExecution contains the creator and ID of a created execution. +// Execution IDs are of the form {count-targetBlockHeight} type EventCreateExecution struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` ID string `protobuf:"bytes,2,opt,name=ID,proto3" json:"ID,omitempty"` @@ -446,7 +541,7 @@ func (m *EventCreateExecution) Reset() { *m = EventCreateExecution{} } func (m *EventCreateExecution) String() string { return proto.CompactTextString(m) } func (*EventCreateExecution) ProtoMessage() {} func (*EventCreateExecution) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{8} + return fileDescriptor_3d5fff376ba53ecd, []int{9} } func (m *EventCreateExecution) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -512,7 +607,7 @@ func (m *EventCompleteExecution) Reset() { *m = EventCompleteExecution{} func (m *EventCompleteExecution) String() string { return proto.CompactTextString(m) } func (*EventCompleteExecution) ProtoMessage() {} func (*EventCompleteExecution) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{9} + return fileDescriptor_3d5fff376ba53ecd, []int{10} } func (m *EventCompleteExecution) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -613,7 +708,7 @@ func (m *EventDropExecution) Reset() { *m = EventDropExecution{} } func (m *EventDropExecution) String() string { return proto.CompactTextString(m) } func (*EventDropExecution) ProtoMessage() {} func (*EventDropExecution) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{10} + return fileDescriptor_3d5fff376ba53ecd, []int{11} } func (m *EventDropExecution) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -665,7 +760,7 @@ func (m *EventCompleteExecutionEarly) Reset() { *m = EventCompleteExecut func (m *EventCompleteExecutionEarly) String() string { return proto.CompactTextString(m) } func (*EventCompleteExecutionEarly) ProtoMessage() {} func (*EventCompleteExecutionEarly) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{11} + return fileDescriptor_3d5fff376ba53ecd, []int{12} } func (m *EventCompleteExecutionEarly) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -718,7 +813,7 @@ func (m *EventSendItems) Reset() { *m = EventSendItems{} } func (m *EventSendItems) String() string { return proto.CompactTextString(m) } func (*EventSendItems) ProtoMessage() {} func (*EventSendItems) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{12} + return fileDescriptor_3d5fff376ba53ecd, []int{13} } func (m *EventSendItems) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -779,7 +874,7 @@ func (m *EventSetItemString) Reset() { *m = EventSetItemString{} } func (m *EventSetItemString) String() string { return proto.CompactTextString(m) } func (*EventSetItemString) ProtoMessage() {} func (*EventSetItemString) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{13} + return fileDescriptor_3d5fff376ba53ecd, []int{14} } func (m *EventSetItemString) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -845,7 +940,7 @@ func (m *EventCreateTrade) Reset() { *m = EventCreateTrade{} } func (m *EventCreateTrade) String() string { return proto.CompactTextString(m) } func (*EventCreateTrade) ProtoMessage() {} func (*EventCreateTrade) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{14} + return fileDescriptor_3d5fff376ba53ecd, []int{15} } func (m *EventCreateTrade) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -897,7 +992,7 @@ func (m *EventCancelTrade) Reset() { *m = EventCancelTrade{} } func (m *EventCancelTrade) String() string { return proto.CompactTextString(m) } func (*EventCancelTrade) ProtoMessage() {} func (*EventCancelTrade) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{15} + return fileDescriptor_3d5fff376ba53ecd, []int{16} } func (m *EventCancelTrade) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -955,7 +1050,7 @@ func (m *EventFulfillTrade) Reset() { *m = EventFulfillTrade{} } func (m *EventFulfillTrade) String() string { return proto.CompactTextString(m) } func (*EventFulfillTrade) ProtoMessage() {} func (*EventFulfillTrade) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{16} + return fileDescriptor_3d5fff376ba53ecd, []int{17} } func (m *EventFulfillTrade) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1052,7 +1147,7 @@ func (m *EventGooglePurchase) Reset() { *m = EventGooglePurchase{} } func (m *EventGooglePurchase) String() string { return proto.CompactTextString(m) } func (*EventGooglePurchase) ProtoMessage() {} func (*EventGooglePurchase) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{17} + return fileDescriptor_3d5fff376ba53ecd, []int{18} } func (m *EventGooglePurchase) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1125,7 +1220,7 @@ func (m *EventStripePurchase) Reset() { *m = EventStripePurchase{} } func (m *EventStripePurchase) String() string { return proto.CompactTextString(m) } func (*EventStripePurchase) ProtoMessage() {} func (*EventStripePurchase) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{18} + return fileDescriptor_3d5fff376ba53ecd, []int{19} } func (m *EventStripePurchase) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1170,6 +1265,7 @@ func (m *EventStripePurchase) GetID() string { func init() { proto.RegisterType((*EventBurnDebtToken)(nil), "Pylonstech.pylons.pylons.EventBurnDebtToken") + proto.RegisterType((*EventItemCreation)(nil), "Pylonstech.pylons.pylons.EventItemCreation") proto.RegisterType((*EventCreateAccount)(nil), "Pylonstech.pylons.pylons.EventCreateAccount") proto.RegisterType((*EventUpdateAccount)(nil), "Pylonstech.pylons.pylons.EventUpdateAccount") proto.RegisterType((*EventCreateCookbook)(nil), "Pylonstech.pylons.pylons.EventCreateCookbook") @@ -1193,70 +1289,76 @@ func init() { func init() { proto.RegisterFile("pylons/event.proto", fileDescriptor_3d5fff376ba53ecd) } var fileDescriptor_3d5fff376ba53ecd = []byte{ - // 1005 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0x26, 0x4e, 0x1a, 0x8f, 0x69, 0xd4, 0x6c, 0xdb, 0x68, 0x1b, 0x8a, 0x1b, 0x56, 0x45, - 0xca, 0xa1, 0xb5, 0x69, 0x41, 0x9c, 0xf8, 0x23, 0x1c, 0x27, 0x91, 0x8b, 0xa0, 0x91, 0x13, 0x38, - 0x80, 0x50, 0x18, 0xef, 0x3e, 0x3b, 0x2b, 0xef, 0xce, 0x2c, 0xb3, 0xb3, 0x51, 0x7d, 0xe6, 0x0b, - 0xc0, 0x9d, 0x4f, 0xc0, 0x97, 0xe0, 0x86, 0x7a, 0xec, 0x91, 0x13, 0xa0, 0xe4, 0xcc, 0x77, 0x40, - 0x33, 0xf3, 0x66, 0xbd, 0x49, 0x70, 0x14, 0xa7, 0x49, 0x4f, 0xf6, 0xbc, 0x79, 0xef, 0xf7, 0xde, - 0xfb, 0xcd, 0x7b, 0x6f, 0x66, 0x89, 0x9b, 0x8e, 0x62, 0xce, 0xb2, 0x26, 0x1c, 0x02, 0x93, 0x8d, - 0x54, 0x70, 0xc9, 0x5d, 0x6f, 0x47, 0xcb, 0x24, 0x04, 0x07, 0x0d, 0xb3, 0x8d, 0x3f, 0xab, 0x77, - 0x06, 0x7c, 0xc0, 0xb5, 0x52, 0x53, 0xfd, 0x33, 0xfa, 0xab, 0xf5, 0x80, 0x67, 0x09, 0xcf, 0x9a, - 0x3d, 0x9a, 0x41, 0xf3, 0xf0, 0x49, 0x0f, 0x24, 0x7d, 0xd2, 0x0c, 0x78, 0xc4, 0x70, 0xff, 0x1d, - 0xf4, 0x31, 0xe0, 0x7c, 0x10, 0xc3, 0x7e, 0x44, 0xd3, 0x7d, 0x2e, 0x42, 0x10, 0xb8, 0xbd, 0x62, - 0x43, 0x78, 0x01, 0x41, 0x2e, 0x23, 0x6e, 0xcd, 0x96, 0x51, 0x1e, 0x49, 0x48, 0x50, 0x74, 0x1b, - 0x45, 0x02, 0x82, 0x28, 0x05, 0x14, 0xde, 0x45, 0x61, 0xc0, 0xf9, 0xb0, 0xc7, 0xf9, 0x10, 0xc5, - 0x36, 0x33, 0x29, 0x68, 0x68, 0x55, 0xef, 0xa1, 0x2c, 0xa5, 0xa3, 0x04, 0x98, 0xdc, 0x8f, 0x58, - 0xdf, 0x26, 0xe1, 0x15, 0xd0, 0x21, 0x40, 0x52, 0xda, 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, 0xfa, 0xcc, 0x9f, 0xc7, 0xf5, 0x99, 0x6f, 0x1f, 0x95, 0x0e, 0xc9, 0x30, 0xfc, 0x58, 0x51, - 0xdc, 0xc4, 0xaf, 0x81, 0x17, 0xf6, 0x8f, 0x3e, 0xae, 0xde, 0x82, 0xfe, 0x22, 0xf8, 0xe0, 0xbf, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x61, 0xc1, 0x3e, 0x6f, 0x36, 0x0d, 0x00, 0x00, + // 1089 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4f, 0x6f, 0x5b, 0x45, + 0x10, 0x8f, 0x13, 0xc7, 0x8d, 0xc7, 0x34, 0x6a, 0xb6, 0x6d, 0xe4, 0x86, 0xe2, 0x06, 0xab, 0xa0, + 0x08, 0xb5, 0x36, 0x2d, 0x88, 0x13, 0x7f, 0x54, 0xc7, 0x49, 0xe4, 0x22, 0xda, 0xc8, 0x09, 0x1c, + 0x40, 0x28, 0x3c, 0x3f, 0x8f, 0x9d, 0x27, 0xfb, 0xed, 0x3e, 0xf6, 0xed, 0x8b, 0xea, 0x33, 0x5f, + 0x00, 0xee, 0x7c, 0x02, 0x0e, 0x7c, 0x05, 0x6e, 0xa8, 0xc7, 0x1e, 0x39, 0x01, 0x4a, 0xce, 0x7c, + 0x07, 0xb4, 0xbb, 0xb3, 0xcf, 0x2f, 0x31, 0x8e, 0xf2, 0xaf, 0x9c, 0xec, 0x9d, 0x9d, 0xf9, 0xcd, + 0xcc, 0x6f, 0x66, 0x67, 0xf7, 0x01, 0x8b, 0x46, 0x43, 0xc1, 0xe3, 0x3a, 0x1e, 0x20, 0x57, 0xb5, + 0x48, 0x0a, 0x25, 0x58, 0x79, 0xdb, 0xc8, 0x14, 0xfa, 0xfb, 0x35, 0xbb, 0x4d, 0x3f, 0x2b, 0xb7, + 0xfa, 0xa2, 0x2f, 0x8c, 0x52, 0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a, 0xbd, 0x8c, 0x84, 0xad, 0xc0, + 0x82, 0xe5, 0xa7, 0xd5, 0x2c, 0xcf, 0x99, 0xdd, 0x74, 0xcd, 0x56, 0xa1, 0xe4, 0x6b, 0x7c, 0x94, + 0xcf, 0xbc, 0x10, 0xcb, 0x79, 0xb3, 0x9d, 0x15, 0xb1, 0x77, 0x61, 0x91, 0x96, 0x4f, 0xba, 0x5d, + 0x89, 0x71, 0x5c, 0x9e, 0x37, 0x4a, 0x27, 0xa4, 0xec, 0x3d, 0xb8, 0x61, 0x50, 0x03, 0xe4, 0xca, + 0x69, 0x16, 0x8c, 0xe6, 0x84, 0x9c, 0x3d, 0x87, 0x37, 0x88, 0x71, 0x9d, 0x6e, 0x5c, 0xbe, 0xb6, + 0x3a, 0xb7, 0x56, 0x7a, 0xfc, 0xce, 0x74, 0xb6, 0xb6, 0xc7, 0xda, 0x44, 0xd7, 0x31, 0x80, 0xea, + 0x53, 0x2a, 0x89, 0xe1, 0x0a, 0x9f, 0xf8, 0xbe, 0x48, 0xb8, 0x62, 0x65, 0xb8, 0xe6, 0x51, 0x24, + 0x96, 0x31, 0xb7, 0xd4, 0x94, 0x24, 0x31, 0x4a, 0xae, 0x73, 0xb6, 0x84, 0xa5, 0xeb, 0x14, 0xeb, + 0xcb, 0xa8, 0x7b, 0x69, 0xac, 0xcf, 0xe0, 0x66, 0x26, 0xae, 0x75, 0xaa, 0x89, 0x06, 0x33, 0xec, + 0x09, 0xe9, 0xc0, 0x68, 0xc9, 0x16, 0x61, 0x36, 0xad, 0xe1, 0x6c, 0xab, 0x59, 0x1d, 0x10, 0x80, + 0x0d, 0x26, 0x05, 0xd8, 0x85, 0x1b, 0x42, 0x06, 0xfd, 0x80, 0x7b, 0x43, 0x27, 0xa3, 0x96, 0xab, + 0x4e, 0x27, 0xd1, 0x69, 0x12, 0x83, 0x13, 0x08, 0xd5, 0x6f, 0xe0, 0xb6, 0x71, 0xb6, 0x2b, 0x3d, + 0x1e, 0xf7, 0x50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5, 0x51, 0x65, 0xe6, 0x8f, 0xa3, 0xca, 0xcc, 0xd7, 0x0f, 0x32, 0x45, + 0xb2, 0x0c, 0x3f, 0xd4, 0x14, 0xd7, 0xe9, 0xf3, 0xe9, 0x85, 0xfb, 0x63, 0xca, 0xd5, 0x29, 0x98, + 0x4f, 0xa8, 0x0f, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x38, 0x8a, 0x31, 0x67, 0x0e, 0x00, + 0x00, } func (m *EventBurnDebtToken) Marshal() (dAtA []byte, err error) { @@ -1292,6 +1394,85 @@ func (m *EventBurnDebtToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *EventItemCreation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventItemCreation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventItemCreation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PaymentInfos) > 0 { + for iNdEx := len(m.PaymentInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PaymentInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.RecipientAddress) > 0 { + i -= len(m.RecipientAddress) + copy(dAtA[i:], m.RecipientAddress) + i = encodeVarintEvent(dAtA, i, uint64(len(m.RecipientAddress))) + i-- + dAtA[i] = 0x32 + } + if len(m.CreaterAddress) > 0 { + i -= len(m.CreaterAddress) + copy(dAtA[i:], m.CreaterAddress) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CreaterAddress))) + i-- + dAtA[i] = 0x2a + } + if len(m.CreaterName) > 0 { + i -= len(m.CreaterName) + copy(dAtA[i:], m.CreaterName) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CreaterName))) + i-- + dAtA[i] = 0x22 + } + if len(m.RecipeID) > 0 { + i -= len(m.RecipeID) + copy(dAtA[i:], m.RecipeID) + i = encodeVarintEvent(dAtA, i, uint64(len(m.RecipeID))) + i-- + dAtA[i] = 0x1a + } + if len(m.CookbookID) > 0 { + i -= len(m.CookbookID) + copy(dAtA[i:], m.CookbookID) + i = encodeVarintEvent(dAtA, i, uint64(len(m.CookbookID))) + i-- + dAtA[i] = 0x12 + } + if len(m.ItemID) > 0 { + i -= len(m.ItemID) + copy(dAtA[i:], m.ItemID) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ItemID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *EventCreateAccount) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2225,6 +2406,45 @@ func (m *EventBurnDebtToken) Size() (n int) { return n } +func (m *EventItemCreation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ItemID) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CookbookID) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.RecipeID) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CreaterName) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.CreaterAddress) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.RecipientAddress) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if len(m.PaymentInfos) > 0 { + for _, e := range m.PaymentInfos { + l = e.Size() + n += 1 + l + sovEvent(uint64(l)) + } + } + return n +} + func (m *EventCreateAccount) Size() (n int) { if m == nil { return 0 @@ -2723,6 +2943,282 @@ func (m *EventBurnDebtToken) Unmarshal(dAtA []byte) error { } return nil } +func (m *EventItemCreation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventItemCreation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventItemCreation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ItemID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ItemID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CookbookID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CookbookID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RecipeID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RecipeID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreaterName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CreaterName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreaterAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CreaterAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RecipientAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RecipientAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymentInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PaymentInfos = append(m.PaymentInfos, PaymentInfo{}) + if err := m.PaymentInfos[len(m.PaymentInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *EventCreateAccount) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From a43845d5dc3102b739309b6376045fbf83b52554 Mon Sep 17 00:00:00 2001 From: aliirns Date: Thu, 19 May 2022 18:47:28 +0500 Subject: [PATCH 2/5] set cookbook-creator as recipient address in Item creation event --- x/pylons/keeper/msg_server_execute_recipe.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/x/pylons/keeper/msg_server_execute_recipe.go b/x/pylons/keeper/msg_server_execute_recipe.go index 670a87c4b4..fb94876840 100644 --- a/x/pylons/keeper/msg_server_execute_recipe.go +++ b/x/pylons/keeper/msg_server_execute_recipe.go @@ -72,6 +72,7 @@ func (k msgServer) ExecuteRecipe(goCtx context.Context, msg *types.MsgExecuteRec } cookbook, found := k.GetCookbook(ctx, msg.CookbookID) + if !found { return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "main cookbook not found") } @@ -164,16 +165,17 @@ func (k msgServer) ExecuteRecipe(goCtx context.Context, msg *types.MsgExecuteRec }) //to do - // creater NAme + // creater Name // recipient address + err = ctx.EventManager().EmitTypedEvent(&types.EventItemCreation{ ItemID: id, CookbookID: recipe.CookbookID, RecipeID: recipe.ID, PaymentInfos: msg.PaymentInfos, CreaterAddress: msg.Creator, - CreaterName: execution.Creator, - RecipientAddress: execution.Creator, + CreaterName: "Temp-Creator-Name", + RecipientAddress: cookbook.Creator, }) return &types.MsgExecuteRecipeResponse{ID: id}, err From ab380b06a65aeb7e182a7bf56db30a849fdd4f49 Mon Sep 17 00:00:00 2001 From: aliirns Date: Mon, 23 May 2022 19:40:15 +0500 Subject: [PATCH 3/5] added event for item creation --- proto/pylons/event.proto | 9 ++++---- x/pylons/keeper/msg_server_execute_recipe.go | 24 ++++++++++++-------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/proto/pylons/event.proto b/proto/pylons/event.proto index 6007e3fc05..48ac4c5f36 100644 --- a/proto/pylons/event.proto +++ b/proto/pylons/event.proto @@ -22,10 +22,11 @@ message EventItemCreation { string itemID = 1; string cookbookID = 2; string recipeID = 3; - string createrName = 4; - string createrAddress = 5; - string recipientAddress = 6; - repeated PaymentInfo paymentInfos = 7 [ (gogoproto.nullable) = false ]; + string senderName = 4; + string sender = 5; + string reciever = 6; + string amount = 7; + string time = 8; } message EventCreateAccount { diff --git a/x/pylons/keeper/msg_server_execute_recipe.go b/x/pylons/keeper/msg_server_execute_recipe.go index fb94876840..f1bbccacb1 100644 --- a/x/pylons/keeper/msg_server_execute_recipe.go +++ b/x/pylons/keeper/msg_server_execute_recipe.go @@ -164,18 +164,22 @@ func (k msgServer) ExecuteRecipe(goCtx context.Context, msg *types.MsgExecuteRec PaymentInfos: msg.PaymentInfos, }) - //to do - // creater Name - // recipient address + //query sender name by address + //found is true if found + senderName, found := k.GetUsernameByAddress(ctx, msg.Creator) + if found != true { + return nil, err + } err = ctx.EventManager().EmitTypedEvent(&types.EventItemCreation{ - ItemID: id, - CookbookID: recipe.CookbookID, - RecipeID: recipe.ID, - PaymentInfos: msg.PaymentInfos, - CreaterAddress: msg.Creator, - CreaterName: "Temp-Creator-Name", - RecipientAddress: cookbook.Creator, + ItemID: id, + CookbookID: recipe.CookbookID, + RecipeID: recipe.ID, + Sender: msg.Creator, + Reciever: cookbook.Creator, + SenderName: senderName.GetValue(), + Amount: coinInputs.String(), + Time: ctx.BlockTime().String(), }) return &types.MsgExecuteRecipeResponse{ID: id}, err From 3f7236db0936cf579884870f837b7bb80b0a8bf9 Mon Sep 17 00:00:00 2001 From: Abdullah Jan Khan Date: Fri, 27 May 2022 12:44:53 +0500 Subject: [PATCH 4/5] event for execute recipe was implemented --- proto/pylons/event.proto | 10 - x/pylons/keeper/msg_server_execute_recipe.go | 50 +- x/pylons/types/event.pb.go | 657 +++---------------- x/pylons/types/keys.go | 4 + 4 files changed, 117 insertions(+), 604 deletions(-) diff --git a/proto/pylons/event.proto b/proto/pylons/event.proto index 48ac4c5f36..0c969757d7 100644 --- a/proto/pylons/event.proto +++ b/proto/pylons/event.proto @@ -18,16 +18,6 @@ message EventBurnDebtToken { RedeemInfo redeemInfo = 1 [ (gogoproto.nullable) = false ]; } -message EventItemCreation { - string itemID = 1; - string cookbookID = 2; - string recipeID = 3; - string senderName = 4; - string sender = 5; - string reciever = 6; - string amount = 7; - string time = 8; -} message EventCreateAccount { string address = 1; diff --git a/x/pylons/keeper/msg_server_execute_recipe.go b/x/pylons/keeper/msg_server_execute_recipe.go index f1bbccacb1..23e6ca873f 100644 --- a/x/pylons/keeper/msg_server_execute_recipe.go +++ b/x/pylons/keeper/msg_server_execute_recipe.go @@ -158,29 +158,41 @@ func (k msgServer) ExecuteRecipe(goCtx context.Context, msg *types.MsgExecuteRec id := k.AppendPendingExecution(ctx, execution, recipe.BlockInterval) - err = ctx.EventManager().EmitTypedEvent(&types.EventCreateExecution{ - Creator: execution.Creator, - ID: id, - PaymentInfos: msg.PaymentInfos, - }) - - //query sender name by address - //found is true if found + // converted typed event to regular event for event management purpose + paymentInfo := "" + for _, i := range msg.PaymentInfos { + paymentInfo += i.String() + " " + } + // emit to register an execution event + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.CreateExecutionKey, + sdk.NewAttribute("creator", execution.Creator), + sdk.NewAttribute("ID", id), + sdk.NewAttribute("paymentInfos", paymentInfo), + ), + ) + // query sender name by address + // found is true if found senderName, found := k.GetUsernameByAddress(ctx, msg.Creator) - if found != true { + if !found { return nil, err } - err = ctx.EventManager().EmitTypedEvent(&types.EventItemCreation{ - ItemID: id, - CookbookID: recipe.CookbookID, - RecipeID: recipe.ID, - Sender: msg.Creator, - Reciever: cookbook.Creator, - SenderName: senderName.GetValue(), - Amount: coinInputs.String(), - Time: ctx.BlockTime().String(), - }) + // event to register execution history details history of a recipe + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.CreateItemKey, + sdk.NewAttribute("itemID", id), + sdk.NewAttribute("cookbookID", recipe.CookbookID), + sdk.NewAttribute("recipeID", recipe.ID), + sdk.NewAttribute("sender", msg.Creator), + sdk.NewAttribute("receiver", cookbook.Creator), + sdk.NewAttribute("senderName", senderName.GetValue()), + sdk.NewAttribute("amount", coinInputs.String()), + sdk.NewAttribute("time", ctx.BlockTime().String()), + ), + ) return &types.MsgExecuteRecipeResponse{ID: id}, err } diff --git a/x/pylons/types/event.pb.go b/x/pylons/types/event.pb.go index 47cb1dc544..f271b8a3e0 100644 --- a/x/pylons/types/event.pb.go +++ b/x/pylons/types/event.pb.go @@ -69,98 +69,6 @@ func (m *EventBurnDebtToken) GetRedeemInfo() RedeemInfo { return RedeemInfo{} } -type EventItemCreation struct { - ItemID string `protobuf:"bytes,1,opt,name=itemID,proto3" json:"itemID,omitempty"` - CookbookID string `protobuf:"bytes,2,opt,name=cookbookID,proto3" json:"cookbookID,omitempty"` - RecipeID string `protobuf:"bytes,3,opt,name=recipeID,proto3" json:"recipeID,omitempty"` - CreaterName string `protobuf:"bytes,4,opt,name=createrName,proto3" json:"createrName,omitempty"` - CreaterAddress string `protobuf:"bytes,5,opt,name=createrAddress,proto3" json:"createrAddress,omitempty"` - RecipientAddress string `protobuf:"bytes,6,opt,name=recipientAddress,proto3" json:"recipientAddress,omitempty"` - PaymentInfos []PaymentInfo `protobuf:"bytes,7,rep,name=paymentInfos,proto3" json:"paymentInfos"` -} - -func (m *EventItemCreation) Reset() { *m = EventItemCreation{} } -func (m *EventItemCreation) String() string { return proto.CompactTextString(m) } -func (*EventItemCreation) ProtoMessage() {} -func (*EventItemCreation) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{1} -} -func (m *EventItemCreation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventItemCreation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventItemCreation.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventItemCreation) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventItemCreation.Merge(m, src) -} -func (m *EventItemCreation) XXX_Size() int { - return m.Size() -} -func (m *EventItemCreation) XXX_DiscardUnknown() { - xxx_messageInfo_EventItemCreation.DiscardUnknown(m) -} - -var xxx_messageInfo_EventItemCreation proto.InternalMessageInfo - -func (m *EventItemCreation) GetItemID() string { - if m != nil { - return m.ItemID - } - return "" -} - -func (m *EventItemCreation) GetCookbookID() string { - if m != nil { - return m.CookbookID - } - return "" -} - -func (m *EventItemCreation) GetRecipeID() string { - if m != nil { - return m.RecipeID - } - return "" -} - -func (m *EventItemCreation) GetCreaterName() string { - if m != nil { - return m.CreaterName - } - return "" -} - -func (m *EventItemCreation) GetCreaterAddress() string { - if m != nil { - return m.CreaterAddress - } - return "" -} - -func (m *EventItemCreation) GetRecipientAddress() string { - if m != nil { - return m.RecipientAddress - } - return "" -} - -func (m *EventItemCreation) GetPaymentInfos() []PaymentInfo { - if m != nil { - return m.PaymentInfos - } - return nil -} - type EventCreateAccount struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` @@ -170,7 +78,7 @@ func (m *EventCreateAccount) Reset() { *m = EventCreateAccount{} } func (m *EventCreateAccount) String() string { return proto.CompactTextString(m) } func (*EventCreateAccount) ProtoMessage() {} func (*EventCreateAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{2} + return fileDescriptor_3d5fff376ba53ecd, []int{1} } func (m *EventCreateAccount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -222,7 +130,7 @@ func (m *EventUpdateAccount) Reset() { *m = EventUpdateAccount{} } func (m *EventUpdateAccount) String() string { return proto.CompactTextString(m) } func (*EventUpdateAccount) ProtoMessage() {} func (*EventUpdateAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{3} + return fileDescriptor_3d5fff376ba53ecd, []int{2} } func (m *EventUpdateAccount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -274,7 +182,7 @@ func (m *EventCreateCookbook) Reset() { *m = EventCreateCookbook{} } func (m *EventCreateCookbook) String() string { return proto.CompactTextString(m) } func (*EventCreateCookbook) ProtoMessage() {} func (*EventCreateCookbook) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{4} + return fileDescriptor_3d5fff376ba53ecd, []int{3} } func (m *EventCreateCookbook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -327,7 +235,7 @@ func (m *EventUpdateCookbook) Reset() { *m = EventUpdateCookbook{} } func (m *EventUpdateCookbook) String() string { return proto.CompactTextString(m) } func (*EventUpdateCookbook) ProtoMessage() {} func (*EventUpdateCookbook) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{5} + return fileDescriptor_3d5fff376ba53ecd, []int{4} } func (m *EventUpdateCookbook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -373,7 +281,7 @@ func (m *EventTransferCookbook) Reset() { *m = EventTransferCookbook{} } func (m *EventTransferCookbook) String() string { return proto.CompactTextString(m) } func (*EventTransferCookbook) ProtoMessage() {} func (*EventTransferCookbook) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{6} + return fileDescriptor_3d5fff376ba53ecd, []int{5} } func (m *EventTransferCookbook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -433,7 +341,7 @@ func (m *EventCreateRecipe) Reset() { *m = EventCreateRecipe{} } func (m *EventCreateRecipe) String() string { return proto.CompactTextString(m) } func (*EventCreateRecipe) ProtoMessage() {} func (*EventCreateRecipe) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{7} + return fileDescriptor_3d5fff376ba53ecd, []int{6} } func (m *EventCreateRecipe) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -493,7 +401,7 @@ func (m *EventUpdateRecipe) Reset() { *m = EventUpdateRecipe{} } func (m *EventUpdateRecipe) String() string { return proto.CompactTextString(m) } func (*EventUpdateRecipe) ProtoMessage() {} func (*EventUpdateRecipe) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{8} + return fileDescriptor_3d5fff376ba53ecd, []int{7} } func (m *EventUpdateRecipe) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -541,7 +449,7 @@ func (m *EventCreateExecution) Reset() { *m = EventCreateExecution{} } func (m *EventCreateExecution) String() string { return proto.CompactTextString(m) } func (*EventCreateExecution) ProtoMessage() {} func (*EventCreateExecution) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{9} + return fileDescriptor_3d5fff376ba53ecd, []int{8} } func (m *EventCreateExecution) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -607,7 +515,7 @@ func (m *EventCompleteExecution) Reset() { *m = EventCompleteExecution{} func (m *EventCompleteExecution) String() string { return proto.CompactTextString(m) } func (*EventCompleteExecution) ProtoMessage() {} func (*EventCompleteExecution) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{10} + return fileDescriptor_3d5fff376ba53ecd, []int{9} } func (m *EventCompleteExecution) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -708,7 +616,7 @@ func (m *EventDropExecution) Reset() { *m = EventDropExecution{} } func (m *EventDropExecution) String() string { return proto.CompactTextString(m) } func (*EventDropExecution) ProtoMessage() {} func (*EventDropExecution) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{11} + return fileDescriptor_3d5fff376ba53ecd, []int{10} } func (m *EventDropExecution) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -760,7 +668,7 @@ func (m *EventCompleteExecutionEarly) Reset() { *m = EventCompleteExecut func (m *EventCompleteExecutionEarly) String() string { return proto.CompactTextString(m) } func (*EventCompleteExecutionEarly) ProtoMessage() {} func (*EventCompleteExecutionEarly) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{12} + return fileDescriptor_3d5fff376ba53ecd, []int{11} } func (m *EventCompleteExecutionEarly) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -813,7 +721,7 @@ func (m *EventSendItems) Reset() { *m = EventSendItems{} } func (m *EventSendItems) String() string { return proto.CompactTextString(m) } func (*EventSendItems) ProtoMessage() {} func (*EventSendItems) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{13} + return fileDescriptor_3d5fff376ba53ecd, []int{12} } func (m *EventSendItems) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -874,7 +782,7 @@ func (m *EventSetItemString) Reset() { *m = EventSetItemString{} } func (m *EventSetItemString) String() string { return proto.CompactTextString(m) } func (*EventSetItemString) ProtoMessage() {} func (*EventSetItemString) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{14} + return fileDescriptor_3d5fff376ba53ecd, []int{13} } func (m *EventSetItemString) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -940,7 +848,7 @@ func (m *EventCreateTrade) Reset() { *m = EventCreateTrade{} } func (m *EventCreateTrade) String() string { return proto.CompactTextString(m) } func (*EventCreateTrade) ProtoMessage() {} func (*EventCreateTrade) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{15} + return fileDescriptor_3d5fff376ba53ecd, []int{14} } func (m *EventCreateTrade) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -992,7 +900,7 @@ func (m *EventCancelTrade) Reset() { *m = EventCancelTrade{} } func (m *EventCancelTrade) String() string { return proto.CompactTextString(m) } func (*EventCancelTrade) ProtoMessage() {} func (*EventCancelTrade) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{16} + return fileDescriptor_3d5fff376ba53ecd, []int{15} } func (m *EventCancelTrade) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1050,7 +958,7 @@ func (m *EventFulfillTrade) Reset() { *m = EventFulfillTrade{} } func (m *EventFulfillTrade) String() string { return proto.CompactTextString(m) } func (*EventFulfillTrade) ProtoMessage() {} func (*EventFulfillTrade) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{17} + return fileDescriptor_3d5fff376ba53ecd, []int{16} } func (m *EventFulfillTrade) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1147,7 +1055,7 @@ func (m *EventGooglePurchase) Reset() { *m = EventGooglePurchase{} } func (m *EventGooglePurchase) String() string { return proto.CompactTextString(m) } func (*EventGooglePurchase) ProtoMessage() {} func (*EventGooglePurchase) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{18} + return fileDescriptor_3d5fff376ba53ecd, []int{17} } func (m *EventGooglePurchase) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1220,7 +1128,7 @@ func (m *EventStripePurchase) Reset() { *m = EventStripePurchase{} } func (m *EventStripePurchase) String() string { return proto.CompactTextString(m) } func (*EventStripePurchase) ProtoMessage() {} func (*EventStripePurchase) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5fff376ba53ecd, []int{19} + return fileDescriptor_3d5fff376ba53ecd, []int{18} } func (m *EventStripePurchase) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1265,7 +1173,6 @@ func (m *EventStripePurchase) GetID() string { func init() { proto.RegisterType((*EventBurnDebtToken)(nil), "Pylonstech.pylons.pylons.EventBurnDebtToken") - proto.RegisterType((*EventItemCreation)(nil), "Pylonstech.pylons.pylons.EventItemCreation") proto.RegisterType((*EventCreateAccount)(nil), "Pylonstech.pylons.pylons.EventCreateAccount") proto.RegisterType((*EventUpdateAccount)(nil), "Pylonstech.pylons.pylons.EventUpdateAccount") proto.RegisterType((*EventCreateCookbook)(nil), "Pylonstech.pylons.pylons.EventCreateCookbook") @@ -1289,76 +1196,70 @@ func init() { func init() { proto.RegisterFile("pylons/event.proto", fileDescriptor_3d5fff376ba53ecd) } var fileDescriptor_3d5fff376ba53ecd = []byte{ - // 1089 bytes of a g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ec, 0x3d, 0xb8, 0x61, 0x50, 0x03, 0xe4, 0xca, - 0x69, 0x16, 0x8c, 0xe6, 0x84, 0x9c, 0x3d, 0x87, 0x37, 0x88, 0x71, 0x9d, 0x6e, 0x5c, 0xbe, 0xb6, - 0x3a, 0xb7, 0x56, 0x7a, 0xfc, 0xce, 0x74, 0xb6, 0xb6, 0xc7, 0xda, 0x44, 0xd7, 0x31, 0x80, 0xea, - 0x53, 0x2a, 0x89, 0xe1, 0x0a, 0x9f, 0xf8, 0xbe, 0x48, 0xb8, 0x62, 0x65, 0xb8, 0xe6, 0x51, 0x24, - 0x96, 0x31, 0xb7, 0xd4, 0x94, 0x24, 0x31, 0x4a, 0xae, 0x73, 0xb6, 0x84, 0xa5, 0xeb, 0x14, 0xeb, - 0xcb, 0xa8, 0x7b, 0x69, 0xac, 0xcf, 0xe0, 0x66, 0x26, 0xae, 0x75, 0xaa, 0x89, 0x06, 0x33, 0xec, - 0x09, 0xe9, 0xc0, 0x68, 0xc9, 0x16, 0x61, 0x36, 0xad, 0xe1, 0x6c, 0xab, 0x59, 0x1d, 0x10, 0x80, - 0x0d, 0x26, 0x05, 0xd8, 0x85, 0x1b, 0x42, 0x06, 0xfd, 0x80, 0x7b, 0x43, 0x27, 0xa3, 0x96, 0xab, - 0x4e, 0x27, 0xd1, 0x69, 0x12, 0x83, 0x13, 0x08, 0xd5, 0x6f, 0xe0, 0xb6, 0x71, 0xb6, 0x2b, 0x3d, - 0x1e, 0xf7, 0x50, 0xa6, 0xee, 0x96, 0xa1, 0x10, 0x23, 0xef, 0xa2, 0x0b, 0x97, 0x56, 0xd4, 0x59, - 0x18, 0x1c, 0xa0, 0x74, 0xa9, 0xbb, 0x35, 0x65, 0x32, 0x97, 0x66, 0xf2, 0x2d, 0xb5, 0xb4, 0xa5, - 0xa2, 0x6d, 0x1a, 0xf0, 0x14, 0x22, 0x2a, 0x00, 0xeb, 0x13, 0x4d, 0x3d, 0x96, 0x4c, 0xc0, 0xfb, - 0x04,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a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0x26, 0x4e, 0x1a, 0x8f, 0x69, 0xd4, 0x6c, 0xdb, 0x68, 0x1b, 0x8a, 0x1b, 0x56, 0x45, + 0xca, 0xa1, 0xb5, 0x69, 0x41, 0x9c, 0xf8, 0x23, 0x1c, 0x27, 0x91, 0x8b, 0xa0, 0x91, 0x13, 0x38, + 0x80, 0x50, 0x18, 0xef, 0x3e, 0x3b, 0x2b, 0xef, 0xce, 0x2c, 0xb3, 0xb3, 0x51, 0x7d, 0xe6, 0x0b, + 0xc0, 0x9d, 0x4f, 0xc0, 0x97, 0xe0, 0x86, 0x7a, 0xec, 0x91, 0x13, 0xa0, 0xe4, 0xcc, 0x77, 0x40, + 0x33, 0xf3, 0x66, 0xbd, 0x49, 0x70, 0x14, 0xa7, 0x49, 0x4f, 0xf6, 0xbc, 0x79, 0xef, 0xf7, 0xde, + 0xfb, 0xcd, 0x7b, 0x6f, 0x66, 0x89, 0x9b, 0x8e, 0x62, 0xce, 0xb2, 0x26, 0x1c, 0x02, 0x93, 0x8d, + 0x54, 0x70, 0xc9, 0x5d, 0x6f, 0x47, 0xcb, 0x24, 0x04, 0x07, 0x0d, 0xb3, 0x8d, 0x3f, 0xab, 0x77, + 0x06, 0x7c, 0xc0, 0xb5, 0x52, 0x53, 0xfd, 0x33, 0xfa, 0xab, 0xf5, 0x80, 0x67, 0x09, 0xcf, 0x9a, + 0x3d, 0x9a, 0x41, 0xf3, 0xf0, 0x49, 0x0f, 0x24, 0x7d, 0xd2, 0x0c, 0x78, 0xc4, 0x70, 0xff, 0x1d, + 0xf4, 0x31, 0xe0, 0x7c, 0x10, 0xc3, 0x7e, 0x44, 0xd3, 0x7d, 0x2e, 0x42, 0x10, 0xb8, 0xbd, 0x62, + 0x43, 0x78, 0x01, 0x41, 0x2e, 0x23, 0x6e, 0xcd, 0x96, 0x51, 0x1e, 0x49, 0x48, 0x50, 0x74, 0x1b, + 0x45, 0x02, 0x82, 0x28, 0x05, 0x14, 0xde, 0x45, 0x61, 0xc0, 0xf9, 0xb0, 0xc7, 0xf9, 0x10, 0xc5, + 0x36, 0x33, 0x29, 0x68, 0x68, 0x55, 0xef, 0xa1, 0x2c, 0xa5, 0xa3, 0x04, 0x98, 0xdc, 0x8f, 0x58, + 0xdf, 0x26, 0xe1, 0x15, 0xd0, 0x21, 0x40, 0x52, 0xda, 0xf1, 0x7f, 0x20, 0xee, 0xa6, 0x62, 0xa7, + 0x95, 0x0b, 0xd6, 0x86, 0x9e, 0xdc, 0xe3, 0x43, 0x60, 0xee, 0x33, 0x42, 0x8c, 0x6a, 0x87, 0xf5, + 0xb9, 0xe7, 0xac, 0x39, 0xeb, 0xb5, 0xa7, 0x0f, 0x1b, 0x93, 0x98, 0x6b, 0x74, 0x0b, 0xdd, 0x56, + 0xe5, 0xe5, 0x5f, 0x0f, 0x66, 0xba, 0x25, 0x6b, 0xff, 0x19, 0x7a, 0xd8, 0x10, 0x40, 0x25, 0x7c, + 0x1e, 0x04, 0x3c, 0x67, 0xd2, 0xf5, 0xc8, 0x0d, 0x1a, 0x86, 0x02, 0xb2, 0x4c, 0xc3, 0x57, 0xbb, + 0x76, 0xe9, 0xae, 0x92, 0xc5, 0x3c, 0x03, 0xc1, 0x68, 0x02, 0xde, 0xac, 0xde, 0x2a, 0xd6, 0x05, + 0xd6, 0xd7, 0x69, 0xf8, 0xda, 0x58, 0x9f, 0x91, 0xdb, 0xa5, 0xb8, 0x36, 0x90, 0x5f, 0x05, 0x16, + 0x28, 0x09, 0x17, 0x16, 0x0c, 0x97, 0xee, 0x12, 0x99, 0xed, 0xb4, 0x11, 0x66, 0xb6, 0xd3, 0xf6, + 0x87, 0x08, 0x60, 0x82, 0x29, 0x00, 0xf6, 0xc8, 0x2d, 0x2e, 0xa2, 0x41, 0xc4, 0x68, 0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f, + 0xbd, 0x8a, 0xd6, 0x3c, 0xbb, 0xa1, 0x3c, 0x66, 0xd1, 0x80, 0x51, 0x99, 0x0b, 0xf0, 0xe6, 0x8d, + 0xc7, 0x42, 0x50, 0xbc, 0x43, 0x55, 0xb3, 0xa5, 0x17, 0x49, 0xe0, 0xd4, 0xb0, 0x6b, 0x6d, 0xbd, + 0x3c, 0xaa, 0x3b, 0xaf, 0x8e, 0xea, 0xce, 0x3f, 0x47, 0x75, 0xe7, 0xe7, 0xe3, 0xfa, 0xcc, 0xab, + 0xe3, 0xfa, 0xcc, 0x9f, 0xc7, 0xf5, 0x99, 0x6f, 0x1f, 0x95, 0x0e, 0xc9, 0x30, 0xfc, 0x58, 0x51, + 0xdc, 0xc4, 0xaf, 0x81, 0x17, 0xf6, 0x8f, 0x3e, 0xae, 0xde, 0x82, 0xfe, 0x22, 0xf8, 0xe0, 0xbf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x61, 0xc1, 0x3e, 0x6f, 0x36, 0x0d, 0x00, 0x00, } func (m *EventBurnDebtToken) Marshal() (dAtA []byte, err error) { @@ -1394,85 +1295,6 @@ func (m *EventBurnDebtToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *EventItemCreation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventItemCreation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventItemCreation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PaymentInfos) > 0 { - for iNdEx := len(m.PaymentInfos) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.PaymentInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.RecipientAddress) > 0 { - i -= len(m.RecipientAddress) - copy(dAtA[i:], m.RecipientAddress) - i = encodeVarintEvent(dAtA, i, uint64(len(m.RecipientAddress))) - i-- - dAtA[i] = 0x32 - } - if len(m.CreaterAddress) > 0 { - i -= len(m.CreaterAddress) - copy(dAtA[i:], m.CreaterAddress) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CreaterAddress))) - i-- - dAtA[i] = 0x2a - } - if len(m.CreaterName) > 0 { - i -= len(m.CreaterName) - copy(dAtA[i:], m.CreaterName) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CreaterName))) - i-- - dAtA[i] = 0x22 - } - if len(m.RecipeID) > 0 { - i -= len(m.RecipeID) - copy(dAtA[i:], m.RecipeID) - i = encodeVarintEvent(dAtA, i, uint64(len(m.RecipeID))) - i-- - dAtA[i] = 0x1a - } - if len(m.CookbookID) > 0 { - i -= len(m.CookbookID) - copy(dAtA[i:], m.CookbookID) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CookbookID))) - i-- - dAtA[i] = 0x12 - } - if len(m.ItemID) > 0 { - i -= len(m.ItemID) - copy(dAtA[i:], m.ItemID) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ItemID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *EventCreateAccount) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2406,45 +2228,6 @@ func (m *EventBurnDebtToken) Size() (n int) { return n } -func (m *EventItemCreation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ItemID) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - l = len(m.CookbookID) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - l = len(m.RecipeID) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - l = len(m.CreaterName) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - l = len(m.CreaterAddress) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - l = len(m.RecipientAddress) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - if len(m.PaymentInfos) > 0 { - for _, e := range m.PaymentInfos { - l = e.Size() - n += 1 + l + sovEvent(uint64(l)) - } - } - return n -} - func (m *EventCreateAccount) Size() (n int) { if m == nil { return 0 @@ -2943,282 +2726,6 @@ func (m *EventBurnDebtToken) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventItemCreation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventItemCreation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventItemCreation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ItemID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ItemID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CookbookID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CookbookID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RecipeID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RecipeID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreaterName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CreaterName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreaterAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CreaterAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RecipientAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RecipientAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PaymentInfos", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PaymentInfos = append(m.PaymentInfos, PaymentInfo{}) - if err := m.PaymentInfos[len(m.PaymentInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *EventCreateAccount) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/pylons/types/keys.go b/x/pylons/types/keys.go index aacd279702..8ed7715544 100644 --- a/x/pylons/types/keys.go +++ b/x/pylons/types/keys.go @@ -66,6 +66,10 @@ const ( UsernameKey = "Username-value-" // AccountKey is a string used as prefix to the KVStore AccountKey = "PylonsAccount-value-" + // CreateItemKey is a string used as event name in msg execute recipe + CreateItemKey = "create_item" + // CreateExecutionKey is a string used as event name in msg execute recipe + CreateExecutionKey = "create_execution" ) const ( From 9579f70f0f40b8ce76784b9455b72d5ac48d09c1 Mon Sep 17 00:00:00 2001 From: Abdullah Jan Khan Date: Fri, 27 May 2022 17:07:54 +0500 Subject: [PATCH 5/5] test cases were updated added balance to new address to execute recipe --- x/pylons/client/cli/cli_test.go | 21 +++++++--- x/pylons/client/cli/easel_test.go | 4 +- x/pylons/client/cli/loud_game_test.go | 4 +- x/pylons/client/cli/misc_execs_test.go | 4 +- .../cli/tx_complete_execution_early_test.go | 4 +- x/pylons/client/cli/tx_fulfill_trade_test.go | 41 +++++-------------- x/pylons/client/cli/tx_send_items_test.go | 4 +- .../client/cli/tx_set_item_string_test.go | 4 +- x/pylons/client/cli/tx_trade_test.go | 30 +++++++------- x/pylons/keeper/msg_server_execute_recipe.go | 2 +- .../keeper/msg_server_execute_recipe_test.go | 8 +++- x/pylons/types/keys.go | 4 ++ 12 files changed, 64 insertions(+), 66 deletions(-) diff --git a/x/pylons/client/cli/cli_test.go b/x/pylons/client/cli/cli_test.go index 927700f5b9..3f59e5f3a7 100644 --- a/x/pylons/client/cli/cli_test.go +++ b/x/pylons/client/cli/cli_test.go @@ -12,6 +12,7 @@ import ( clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" sdk "github.com/cosmos/cosmos-sdk/types" + bank "github.com/cosmos/cosmos-sdk/x/bank/client/cli" "github.com/stretchr/testify/require" "github.com/Pylons-tech/pylons/x/pylons/client/cli" @@ -48,12 +49,7 @@ func GenerateAddressesInKeyring(ring keyring.Keyring, n int) []sdk.AccAddress { func GenerateAddressWithAccount(ctx client.Context, t *testing.T, net *network.Network) (string, error) { accs := GenerateAddressesInKeyring(ctx.Keyring, 1) - common := []string{ - fmt.Sprintf("--%s=%s", flags.FlagFrom, accs[0].String()), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(net.Config.BondDenom, sdk.NewInt(10))).String()), - } + common := CommonArgs(accs[0].String(), net) username := "user" @@ -70,6 +66,19 @@ func GenerateAddressWithAccount(ctx client.Context, t *testing.T, net *network.N return "", fmt.Errorf("Error Code Not Success") } + common = CommonArgs(net.Validators[0].Address.String(), net) + + args = []string{net.Validators[0].Address.String(), accs[0].String(), "1000node0token"} + args = append(args, common...) + out, err = clitestutil.ExecTestCLICmd(ctx, bank.NewSendTxCmd(), args) + if err != nil { + return "", err + } + require.NoError(t, ctx.Codec.UnmarshalJSON(out.Bytes(), &resp)) + if uint32(0) != resp.Code { + return "", fmt.Errorf("Error Code Not Success") + } + return accs[0].String(), nil } diff --git a/x/pylons/client/cli/easel_test.go b/x/pylons/client/cli/easel_test.go index 10fe289db8..b328b1b3c9 100644 --- a/x/pylons/client/cli/easel_test.go +++ b/x/pylons/client/cli/easel_test.go @@ -54,9 +54,9 @@ func TestEaselBasic(t *testing.T) { simInfo.basicTradePercentage, err = sdk.NewDecFromStr("0.10") require.NoError(t, err) - simInfo.common = CommonArgs(address, net) + simInfo.executorCommon = CommonArgs(address, net) - simInfo.executorCommon = CommonArgs(val.Address.String(), net) + simInfo.common = CommonArgs(val.Address.String(), net) createEaselCookbook(t, simInfo) createMintRecipe1(t, simInfo) mintNFT1(t, simInfo) diff --git a/x/pylons/client/cli/loud_game_test.go b/x/pylons/client/cli/loud_game_test.go index fe10f9c0b8..284ac27e0c 100644 --- a/x/pylons/client/cli/loud_game_test.go +++ b/x/pylons/client/cli/loud_game_test.go @@ -64,8 +64,8 @@ func TestLOUDBasic(t *testing.T) { simInfo.basicTradePercentage, err = sdk.NewDecFromStr("0.10") require.NoError(t, err) - simInfo.common = CommonArgs(address, net) - simInfo.executorCommon = CommonArgs(val.Address.String(), net) + simInfo.executorCommon = CommonArgs(address, net) + simInfo.common = CommonArgs(val.Address.String(), net) createLOUDCookbook(t, simInfo) createCharacterRecipe(t, simInfo) diff --git a/x/pylons/client/cli/misc_execs_test.go b/x/pylons/client/cli/misc_execs_test.go index 20d3bbc26c..acf57d1f57 100644 --- a/x/pylons/client/cli/misc_execs_test.go +++ b/x/pylons/client/cli/misc_execs_test.go @@ -33,7 +33,7 @@ func TestSingleItemModifyOutput(t *testing.T) { basicTradePercentage, err := sdk.NewDecFromStr("0.10") require.NoError(t, err) - common := CommonArgs(address, net) + common := CommonArgs(val.Address.String(), net) cookbookID := "COOKBOOK_ID" cbFields := []string{ @@ -159,7 +159,7 @@ func TestSingleItemModifyOutput(t *testing.T) { // Execute recipe and check item // execute recipe to mint - commonExec := CommonArgs(val.Address.String(), net) + commonExec := CommonArgs(address, net) args = []string{cookbookID, mintItemRecipeID, "0", "[]", "[]"} // empty list for item-ids since there is no item input args = append(args, commonExec...) out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdExecuteRecipe(), args) diff --git a/x/pylons/client/cli/tx_complete_execution_early_test.go b/x/pylons/client/cli/tx_complete_execution_early_test.go index 23e975d1f3..48b4ee3327 100644 --- a/x/pylons/client/cli/tx_complete_execution_early_test.go +++ b/x/pylons/client/cli/tx_complete_execution_early_test.go @@ -43,7 +43,7 @@ func TestCmdCompleteExecutionEarly(t *testing.T) { } //Common arguments - common := CommonArgs(address, net) + common := CommonArgs(val.Address.String(), net) args := []string{cookbookID} args = append(args, cbFields...) args = append(args, common...) @@ -82,7 +82,7 @@ func TestCmdCompleteExecutionEarly(t *testing.T) { require.NoError(t, err) // create execution - common = CommonArgs(val.Address.String(), net) + common = CommonArgs(address, net) args = []string{cookbookID, recipeID, "1", "[]", "[]"} // empty list for item-ids since there is no item input args = append(args, common...) out, err2 := clitestutil.ExecTestCLICmd(ctx, cli.CmdExecuteRecipe(), args) diff --git a/x/pylons/client/cli/tx_fulfill_trade_test.go b/x/pylons/client/cli/tx_fulfill_trade_test.go index e6929c0182..0af7d7913f 100644 --- a/x/pylons/client/cli/tx_fulfill_trade_test.go +++ b/x/pylons/client/cli/tx_fulfill_trade_test.go @@ -9,7 +9,6 @@ import ( "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" @@ -111,23 +110,13 @@ func TestFulfillTradeItemForCoins(t *testing.T) { ctx := val.ClientCtx var err error - accs := GenerateAddressesInKeyring(val.ClientCtx.Keyring, 1) - trader := accs[0] - traderUsername := "trader" + // getting address and creating account from the created helper function + address, err := GenerateAddressWithAccount(ctx, t, net) + require.NoError(t, err) - fulFillercommon := []string{ - fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(net.Config.BondDenom, sdk.NewInt(10))).String()), - } + traderCommon := CommonArgs(val.Address.String(), net) - traderCommon := []string{ - fmt.Sprintf("--%s=%s", flags.FlagFrom, trader.String()), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(net.Config.BondDenom, sdk.NewInt(10))).String()), - } + fulFillercommon := CommonArgs(address, net) cookbookID := "testCookbookID" itemRecipeID := "itemRecipeID" @@ -147,15 +136,6 @@ func TestFulfillTradeItemForCoins(t *testing.T) { simInfo.basicTradePercentage, err = sdk.NewDecFromStr("0.10") require.NoError(t, err) - // create account for trader - args := []string{traderUsername} - args = append(args, simInfo.traderCommon...) - out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdCreateAccount(), args) - require.NoError(t, err) - var resp sdk.TxResponse - require.NoError(t, ctx.Codec.UnmarshalJSON(out.Bytes(), &resp)) - require.Equal(t, uint32(0), resp.Code) - // simulate full execution of recipe to generate an item cbFields := []string{ @@ -234,7 +214,7 @@ func TestFulfillTradeItemForCoins(t *testing.T) { } // create cookbook - args = []string{cookbookID} + args := []string{cookbookID} args = append(args, cbFields...) args = append(args, simInfo.traderCommon...) _, err = clitestutil.ExecTestCLICmd(ctx, cli.CmdCreateCookbook(), args) @@ -252,8 +232,9 @@ func TestFulfillTradeItemForCoins(t *testing.T) { // create execution args = []string{cookbookID, itemRecipeID, "0", "[]", "[]"} // empty list for item-ids since there is no item input args = append(args, simInfo.fulfillerCommon...) - out, err = clitestutil.ExecTestCLICmd(ctx, cli.CmdExecuteRecipe(), args) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdExecuteRecipe(), args) require.NoError(t, err) + var resp sdk.TxResponse require.NoError(t, ctx.Codec.UnmarshalJSON(out.Bytes(), &resp)) require.Equal(t, uint32(0), resp.Code) @@ -366,13 +347,13 @@ func TestFulfillTradeItemForCoins(t *testing.T) { var listItemResp types.QueryListItemByOwnerResponse require.NoError(t, err) require.NoError(t, ctx.Codec.UnmarshalJSON(out.Bytes(), &listItemResp)) - require.Equal(t, 1, len(listItemResp.Items)) + require.Equal(t, 0, len(listItemResp.Items)) args = make([]string, 0) - args = append(args, trader.String()) + args = append(args, address) out, err = clitestutil.ExecTestCLICmd(ctx, cli.CmdListItemByOwner(), args) require.NoError(t, err) require.NoError(t, ctx.Codec.UnmarshalJSON(out.Bytes(), &listItemResp)) - require.Equal(t, 0, len(listItemResp.Items)) + require.Equal(t, 1, len(listItemResp.Items)) } diff --git a/x/pylons/client/cli/tx_send_items_test.go b/x/pylons/client/cli/tx_send_items_test.go index af30228182..f994b4c38e 100644 --- a/x/pylons/client/cli/tx_send_items_test.go +++ b/x/pylons/client/cli/tx_send_items_test.go @@ -118,7 +118,7 @@ func TestSendItems(t *testing.T) { "extraInfo", } - common := CommonArgs(address, net) + common := CommonArgs(val.Address.String(), net) // create cookbook args := []string{cookbookID} @@ -137,7 +137,7 @@ func TestSendItems(t *testing.T) { numTests := 1 executedItemRefs := make([]string, numTests) - commonExe := CommonArgs(val.Address.String(), net) + commonExe := CommonArgs(address, net) for i := 0; i < numTests; i++ { // create execution args = []string{cookbookID, recipeID, "0", "[]", "[]"} // empty list for item-ids since there is no item input diff --git a/x/pylons/client/cli/tx_set_item_string_test.go b/x/pylons/client/cli/tx_set_item_string_test.go index 1762259f3f..65a12c2000 100644 --- a/x/pylons/client/cli/tx_set_item_string_test.go +++ b/x/pylons/client/cli/tx_set_item_string_test.go @@ -118,7 +118,7 @@ func TestSetItemString(t *testing.T) { "extraInfo", } - common := CommonArgs(address, net) + common := CommonArgs(val.Address.String(), net) // create cookbook args := []string{cookbookID} @@ -135,7 +135,7 @@ func TestSetItemString(t *testing.T) { require.NoError(t, err) // create execution - common = CommonArgs(val.Address.String(), net) + common = CommonArgs(address, net) args = []string{cookbookID, recipeID, "0", "[]", "[]"} // empty list for item-ids since there is no item input args = append(args, common...) out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdExecuteRecipe(), args) diff --git a/x/pylons/client/cli/tx_trade_test.go b/x/pylons/client/cli/tx_trade_test.go index 3424b9393b..68d4e1d299 100644 --- a/x/pylons/client/cli/tx_trade_test.go +++ b/x/pylons/client/cli/tx_trade_test.go @@ -244,7 +244,7 @@ func TestCreateTradeItemOutput(t *testing.T) { "extraInfo", } - common := CommonArgs(string(address), net) + common := CommonArgs(val.Address.String(), net) // create cookbook args := []string{cookbookID} @@ -261,7 +261,7 @@ func TestCreateTradeItemOutput(t *testing.T) { require.NoError(t, err) // create execution - common = CommonArgs(val.Address.String(), net) + common = CommonArgs(address, net) args = []string{cookbookID, recipeID, "0", "[]", "[]"} // empty list for item-ids since there is no item input args = append(args, common...) out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdExecuteRecipe(), args) @@ -347,7 +347,7 @@ func TestCreateTradeItemOutput(t *testing.T) { }{ { desc: "valid", - args: CommonArgs(val.Address.String(), net), + args: CommonArgs(address, net), err: nil, code: uint32(0), }, @@ -466,7 +466,7 @@ func TestCreateTradeItemOutputInvalidCoinInputs1(t *testing.T) { "extraInfo", } - common := CommonArgs(address, net) + common := CommonArgs(val.Address.String(), net) // create cookbook args := []string{cookbookID} @@ -483,7 +483,7 @@ func TestCreateTradeItemOutputInvalidCoinInputs1(t *testing.T) { require.NoError(t, err) // create execution - common = CommonArgs(val.Address.String(), net) + common = CommonArgs(address, net) args = []string{cookbookID, recipeID, "0", "[]", "[]"} // empty list for item-ids since there is no item input args = append(args, common...) out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdExecuteRecipe(), args) @@ -569,7 +569,7 @@ func TestCreateTradeItemOutputInvalidCoinInputs1(t *testing.T) { }{ { desc: "valid", - args: CommonArgs(val.Address.String(), net), + args: CommonArgs(address, net), err: sdkerrors.ErrInvalidRequest, }, } { @@ -687,7 +687,7 @@ func TestCreateTradeItemOutputInvalidCoinInputs2(t *testing.T) { "extraInfo", } - common := CommonArgs(address, net) + common := CommonArgs(val.Address.String(), net) // create cookbook args := []string{cookbookID} @@ -704,7 +704,7 @@ func TestCreateTradeItemOutputInvalidCoinInputs2(t *testing.T) { require.NoError(t, err) // create execution - common = CommonArgs(val.Address.String(), net) + common = CommonArgs(address, net) args = []string{cookbookID, recipeID, "0", "[]", "[]"} // empty list for item-ids since there is no item input args = append(args, common...) out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdExecuteRecipe(), args) @@ -790,7 +790,7 @@ func TestCreateTradeItemOutputInvalidCoinInputs2(t *testing.T) { }{ { desc: "valid", - args: CommonArgs(val.Address.String(), net), + args: CommonArgs(address, net), err: sdkerrors.ErrInvalidRequest, }, } { @@ -908,7 +908,7 @@ func TestCreateTradeItemOutputInvalidCoinInputs3(t *testing.T) { "extraInfo", } - common := CommonArgs(address, net) + common := CommonArgs(val.Address.String(), net) // create cookbook args := []string{cookbookID} @@ -925,7 +925,7 @@ func TestCreateTradeItemOutputInvalidCoinInputs3(t *testing.T) { require.NoError(t, err) // create execution - common = CommonArgs(val.Address.String(), net) + common = CommonArgs(address, net) args = []string{cookbookID, recipeID, "0", "[]", "[]"} // empty list for item-ids since there is no item input args = append(args, common...) out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdExecuteRecipe(), args) @@ -1011,7 +1011,7 @@ func TestCreateTradeItemOutputInvalidCoinInputs3(t *testing.T) { }{ { desc: "valid", - args: CommonArgs(val.Address.String(), net), + args: CommonArgs(address, net), err: sdkerrors.ErrInvalidRequest, }, } { @@ -1128,7 +1128,7 @@ func TestCreateTradeItemOutputInvalidNonTradable(t *testing.T) { "extraInfo", } - common := CommonArgs(address, net) + common := CommonArgs(val.Address.String(), net) // create cookbook args := []string{cookbookID} @@ -1145,7 +1145,7 @@ func TestCreateTradeItemOutputInvalidNonTradable(t *testing.T) { require.NoError(t, err) // create execution - common = CommonArgs(val.Address.String(), net) + common = CommonArgs(address, net) args = []string{cookbookID, recipeID, "0", "[]", "[]"} // empty list for item-ids since there is no item input args = append(args, common...) out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdExecuteRecipe(), args) @@ -1231,7 +1231,7 @@ func TestCreateTradeItemOutputInvalidNonTradable(t *testing.T) { }{ { desc: "valid", - args: CommonArgs(val.Address.String(), net), + args: CommonArgs(address, net), err: nil, code: sdkerrors.ErrInvalidRequest.ABCICode(), }, diff --git a/x/pylons/keeper/msg_server_execute_recipe.go b/x/pylons/keeper/msg_server_execute_recipe.go index 23e6ca873f..11fc5bd6f3 100644 --- a/x/pylons/keeper/msg_server_execute_recipe.go +++ b/x/pylons/keeper/msg_server_execute_recipe.go @@ -176,7 +176,7 @@ func (k msgServer) ExecuteRecipe(goCtx context.Context, msg *types.MsgExecuteRec // found is true if found senderName, found := k.GetUsernameByAddress(ctx, msg.Creator) if !found { - return nil, err + return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "user account username not found") } // event to register execution history details history of a recipe diff --git a/x/pylons/keeper/msg_server_execute_recipe_test.go b/x/pylons/keeper/msg_server_execute_recipe_test.go index 904e7f090e..dc0b111bdc 100755 --- a/x/pylons/keeper/msg_server_execute_recipe_test.go +++ b/x/pylons/keeper/msg_server_execute_recipe_test.go @@ -18,7 +18,11 @@ func (suite *IntegrationTestSuite) TestExecuteRecipe() { wctx := sdk.WrapSDKContext(ctx) creator := "A" - executor := "B" + _, err := srv.CreateAccount(wctx, &types.MsgCreateAccount{ + Creator: types.TestCreator, + Username: "test", + }) + require.NoError(err) for i := 0; i < 5; i++ { idx := fmt.Sprintf("%d", i) cookbook := &types.MsgCreateCookbook{ @@ -56,7 +60,7 @@ func (suite *IntegrationTestSuite) TestExecuteRecipe() { require.Equal(recipe.ID, rst.ID) execution := &types.MsgExecuteRecipe{ - Creator: executor, + Creator: types.TestCreator, CookbookID: idx, RecipeID: idx, CoinInputsIndex: 0, diff --git a/x/pylons/types/keys.go b/x/pylons/types/keys.go index 8ed7715544..dd0abd134d 100644 --- a/x/pylons/types/keys.go +++ b/x/pylons/types/keys.go @@ -79,3 +79,7 @@ const ( const ( RedeemInfoKey = "RedeemInfo-value-" ) + +const ( + TestCreator = "pylo13qsmvq0eg7nu7dlt9mxqxn7ufjsqy8433akvy3" +)