Skip to content

Commit

Permalink
Merge pull request #470 from CosmWasm/reply-gas-used
Browse files Browse the repository at this point in the history
Add GasUsed to Reply
  • Loading branch information
chipshort committed Nov 20, 2023
2 parents 5ffebf2 + 70d7fd7 commit db68e4b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions types/submessages.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ type SubMsg struct {
ReplyOn replyOn `json:"reply_on"`
}

// The result object returned to `reply`. We always get the ID from the submessage back and then must handle success and error cases ourselves.
type Reply struct {
// The amount of gas used by the submessage, measured in [Cosmos SDK gas](https://github.com/CosmWasm/cosmwasm/blob/main/docs/GAS.md).
GasUsed uint64 `json:"gas_used"`
// The ID that the contract set when emitting the `SubMsg`. Use this to identify which submessage triggered the `reply`.
ID uint64 `json:"id"`
Result SubMsgResult `json:"result"`
}
Expand Down

0 comments on commit db68e4b

Please sign in to comment.