@@ -3,8 +3,8 @@ use connection_router_api::CrossChainId;
3
3
#[ cfg( not( feature = "library" ) ) ]
4
4
use cosmwasm_std:: entry_point;
5
5
use cosmwasm_std:: {
6
- from_binary , to_binary , Binary , Deps , DepsMut , Env , MessageInfo , QueryRequest , Reply , Response ,
7
- StdResult , WasmQuery ,
6
+ from_json , to_json_binary , Binary , Deps , DepsMut , Env , MessageInfo , QueryRequest , Reply ,
7
+ Response , StdResult , WasmQuery ,
8
8
} ;
9
9
use cw_utils:: { parse_reply_execute_data, MsgExecuteContractResponse } ;
10
10
@@ -45,7 +45,7 @@ pub fn execute(
45
45
}
46
46
47
47
pub mod execute {
48
- use cosmwasm_std:: { to_binary , SubMsg , WasmMsg } ;
48
+ use cosmwasm_std:: { to_json_binary , SubMsg , WasmMsg } ;
49
49
50
50
use connection_router_api:: Message ;
51
51
@@ -59,7 +59,7 @@ pub mod execute {
59
59
Ok ( Response :: new ( ) . add_submessage ( SubMsg :: reply_on_success (
60
60
WasmMsg :: Execute {
61
61
contract_addr : verifier. to_string ( ) ,
62
- msg : to_binary ( & voting_msg:: ExecuteMsg :: VerifyMessages { messages : msgs } ) ?,
62
+ msg : to_json_binary ( & voting_msg:: ExecuteMsg :: VerifyMessages { messages : msgs } ) ?,
63
63
funds : vec ! [ ] ,
64
64
} ,
65
65
VERIFY_REPLY ,
@@ -79,7 +79,7 @@ pub fn reply(
79
79
match parse_reply_execute_data ( reply) {
80
80
Ok ( MsgExecuteContractResponse { data : Some ( data) } ) => {
81
81
// check format of data
82
- let _: Vec < ( CrossChainId , VerificationStatus ) > = from_binary ( & data) ?;
82
+ let _: Vec < ( CrossChainId , VerificationStatus ) > = from_json ( & data) ?;
83
83
84
84
// only one verifier, so just return the response as is
85
85
Ok ( Response :: new ( ) . set_data ( data) )
@@ -102,7 +102,7 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult<Binary> {
102
102
let verifier = CONFIG . load ( deps. storage ) ?. verifier ;
103
103
deps. querier . query ( & QueryRequest :: Wasm ( WasmQuery :: Smart {
104
104
contract_addr : verifier. to_string ( ) ,
105
- msg : to_binary ( & voting_msg:: QueryMsg :: GetMessagesStatus { messages } ) ?,
105
+ msg : to_json_binary ( & voting_msg:: QueryMsg :: GetMessagesStatus { messages } ) ?,
106
106
} ) )
107
107
}
108
108
}
0 commit comments