Skip to content

Commit c1a7e6e

Browse files
chipshortmergify[bot]
authored andcommitted
Fix gas_used deserialization
(cherry picked from commit 9bdf442)
1 parent b96aa96 commit c1a7e6e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/std/src/results/submessages.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ pub struct Reply {
181181
pub payload: Binary,
182182
/// The amount of gas used by the submessage,
183183
/// measured in [Cosmos SDK gas](https://github.com/CosmWasm/cosmwasm/blob/main/docs/GAS.md).
184+
///
185+
/// This only contains a useful value on chains running CosmWasm 2.0 or higher.
186+
/// On older chains, this field is always 0.
187+
#[serde(default)]
184188
pub gas_used: u64,
185189
pub result: SubMsgResult,
186190
}

0 commit comments

Comments
 (0)