-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/events #573
Merged
Merged
Fix/events #573
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
04f191e
added EventItemCreation: still under development
aliirns a43845d
set cookbook-creator as recipient address in Item creation event
aliirns ab380b0
added event for item creation
aliirns 3f7236d
event for execute recipe was implemented
9579f70
test cases were updated added balance to new address to execute recipe
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ genesis/pylonsd | |
|
||
artifacts | ||
|
||
cmd/pylonsd/__debug_bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,10 @@ 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 EventCreateAccount { | ||
string address = 1; | ||
string username = 2; | ||
|
@@ -33,9 +34,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 +52,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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same with this line as well, too many copy/pastes. |
||
]; | ||
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 +106,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 +131,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 +156,3 @@ message EventStripePurchase { | |
string creator = 1; | ||
string ID = 2; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line has been copy/pasted a lot throughout the code, more reusability would be better.