File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ use schemars::JsonSchema;
2
2
use serde:: { Deserialize , Serialize } ;
3
3
4
4
use crate :: Binary ;
5
+ #[ cfg( feature = "cosmwasm_1_2" ) ]
6
+ use crate :: HexBinary ;
5
7
6
8
use super :: query_response:: QueryResponseType ;
7
9
@@ -80,7 +82,7 @@ pub struct CodeInfoResponse {
80
82
/// The address that initially stored the code
81
83
pub creator : String ,
82
84
/// The hash of the Wasm blob
83
- pub checksum : Binary ,
85
+ pub checksum : HexBinary ,
84
86
}
85
87
86
88
#[ cfg( feature = "cosmwasm_1_2" ) ]
Original file line number Diff line number Diff line change @@ -1492,14 +1492,14 @@ mod tests {
1492
1492
}
1493
1493
#[ cfg( feature = "cosmwasm_1_2" ) ]
1494
1494
WasmQuery :: CodeInfo { code_id } => {
1495
+ use crate :: { CodeInfoResponse , HexBinary } ;
1495
1496
let code_id = * code_id;
1496
1497
if code_id == 4 {
1497
- use crate :: CodeInfoResponse ;
1498
1498
let response = CodeInfoResponse {
1499
1499
code_id,
1500
1500
creator : "lalala" . into ( ) ,
1501
- checksum : Binary :: from_base64 (
1502
- "hM8ggQ/UKcr1iJjDIQ/LcXWaJ77N2uCNvehmjqL0cl0= " ,
1501
+ checksum : HexBinary :: from_hex (
1502
+ "84cf20810fd429caf58898c3210fcb71759a27becddae08dbde8668ea2f4725d " ,
1503
1503
)
1504
1504
. unwrap ( ) ,
1505
1505
} ;
@@ -1572,7 +1572,7 @@ mod tests {
1572
1572
match result {
1573
1573
SystemResult :: Ok ( ContractResult :: Ok ( value) ) => assert_eq ! (
1574
1574
value,
1575
- br#"{"code_id":4,"creator":"lalala","checksum":"hM8ggQ/UKcr1iJjDIQ/LcXWaJ77N2uCNvehmjqL0cl0= "}"#
1575
+ br#"{"code_id":4,"creator":"lalala","checksum":"84cf20810fd429caf58898c3210fcb71759a27becddae08dbde8668ea2f4725d "}"#
1576
1576
) ,
1577
1577
res => panic ! ( "Unexpected result: {:?}" , res) ,
1578
1578
}
You can’t perform that action at this time.
0 commit comments