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;
22use serde:: { Deserialize , Serialize } ;
33
44use crate :: Binary ;
5+ #[ cfg( feature = "cosmwasm_1_2" ) ]
6+ use crate :: HexBinary ;
57
68use super :: query_response:: QueryResponseType ;
79
@@ -80,7 +82,7 @@ pub struct CodeInfoResponse {
8082 /// The address that initially stored the code
8183 pub creator : String ,
8284 /// The hash of the Wasm blob
83- pub checksum : Binary ,
85+ pub checksum : HexBinary ,
8486}
8587
8688#[ cfg( feature = "cosmwasm_1_2" ) ]
Original file line number Diff line number Diff line change @@ -1492,14 +1492,14 @@ mod tests {
14921492 }
14931493 #[ cfg( feature = "cosmwasm_1_2" ) ]
14941494 WasmQuery :: CodeInfo { code_id } => {
1495+ use crate :: { CodeInfoResponse , HexBinary } ;
14951496 let code_id = * code_id;
14961497 if code_id == 4 {
1497- use crate :: CodeInfoResponse ;
14981498 let response = CodeInfoResponse {
14991499 code_id,
15001500 creator : "lalala" . into ( ) ,
1501- checksum : Binary :: from_base64 (
1502- "hM8ggQ/UKcr1iJjDIQ/LcXWaJ77N2uCNvehmjqL0cl0= " ,
1501+ checksum : HexBinary :: from_hex (
1502+ "84cf20810fd429caf58898c3210fcb71759a27becddae08dbde8668ea2f4725d " ,
15031503 )
15041504 . unwrap ( ) ,
15051505 } ;
@@ -1572,7 +1572,7 @@ mod tests {
15721572 match result {
15731573 SystemResult :: Ok ( ContractResult :: Ok ( value) ) => assert_eq ! (
15741574 value,
1575- br#"{"code_id":4,"creator":"lalala","checksum":"hM8ggQ/UKcr1iJjDIQ/LcXWaJ77N2uCNvehmjqL0cl0= "}"#
1575+ br#"{"code_id":4,"creator":"lalala","checksum":"84cf20810fd429caf58898c3210fcb71759a27becddae08dbde8668ea2f4725d "}"#
15761576 ) ,
15771577 res => panic ! ( "Unexpected result: {:?}" , res) ,
15781578 }
You can’t perform that action at this time.
0 commit comments