Skip to content

Commit e41df95

Browse files
committed
Add code_id to CodeInfoResponse
1 parent 910f853 commit e41df95

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/std/src/query/wasm.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ impl ContractInfoResponse {
7676
#[derive(Serialize, Deserialize, Clone, Default, Debug, PartialEq, Eq, JsonSchema)]
7777
#[cfg(feature = "cosmwasm_1_2")]
7878
pub struct CodeInfoResponse {
79+
pub code_id: u64,
7980
/// The address that initially stored the code
8081
pub creator: String,
8182
/// The hash of the Wasm blob

packages/std/src/testing/mock.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1496,6 +1496,7 @@ mod tests {
14961496
if code_id == 4 {
14971497
use crate::CodeInfoResponse;
14981498
let response = CodeInfoResponse {
1499+
code_id,
14991500
creator: "lalala".into(),
15001501
checksum: Binary::from_base64(
15011502
"hM8ggQ/UKcr1iJjDIQ/LcXWaJ77N2uCNvehmjqL0cl0=",
@@ -1571,7 +1572,7 @@ mod tests {
15711572
match result {
15721573
SystemResult::Ok(ContractResult::Ok(value)) => assert_eq!(
15731574
value,
1574-
br#"{"creator":"lalala","checksum":"hM8ggQ/UKcr1iJjDIQ/LcXWaJ77N2uCNvehmjqL0cl0="}"#
1575+
br#"{"code_id":4,"creator":"lalala","checksum":"hM8ggQ/UKcr1iJjDIQ/LcXWaJ77N2uCNvehmjqL0cl0="}"#
15751576
),
15761577
res => panic!("Unexpected result: {:?}", res),
15771578
}

0 commit comments

Comments
 (0)