From 70d7fd781e1cbf7e9d82e4f71eb09689182e8a77 Mon Sep 17 00:00:00 2001 From: Christoph Otter Date: Fri, 17 Nov 2023 17:49:22 +0100 Subject: [PATCH] Add GasUsed to Reply --- types/submessages.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/submessages.go b/types/submessages.go index e6145291c..4ab39f049 100644 --- a/types/submessages.go +++ b/types/submessages.go @@ -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"` }