diff --git a/contracts/rekt-airdrop/src/contract.rs b/contracts/rekt-airdrop/src/contract.rs index 04c3b8982..5efbc570c 100644 --- a/contracts/rekt-airdrop/src/contract.rs +++ b/contracts/rekt-airdrop/src/contract.rs @@ -56,7 +56,7 @@ pub fn execute( mod build_message { use super::*; use crate::state::Config; - use cosmwasm_std::{to_binary, Deps, WasmMsg}; + use cosmwasm_std::{to_json_binary, Deps, WasmMsg}; use sg_std::{StargazeMsgWrapper, SubMsg}; use validation::validate_airdrop_amount; use whitelist_immutable::msg::InstantiateMsg as WGInstantiateMsg; @@ -78,7 +78,7 @@ mod build_message { admin: Some(env.contract.address.to_string()), funds: vec![], label: GENERIC_WHITELIST_LABEL.to_string(), - msg: to_binary(&whitelist_instantiate_msg)?, + msg: to_json_binary(&whitelist_instantiate_msg)?, }; Ok(SubMsg::reply_on_success(wasm_msg, INIT_WHITELIST_REPLY_ID)) } diff --git a/contracts/rekt-airdrop/src/query.rs b/contracts/rekt-airdrop/src/query.rs index c3b50fcd1..d36a1aced 100644 --- a/contracts/rekt-airdrop/src/query.rs +++ b/contracts/rekt-airdrop/src/query.rs @@ -1,5 +1,5 @@ use crate::{msg::QueryMsg, state::CONFIG, ContractError}; -use cosmwasm_std::{entry_point, to_binary, Binary}; +use cosmwasm_std::{entry_point, to_json_binary, Binary}; use cosmwasm_std::{Addr, Env}; use cosmwasm_std::{Deps, DepsMut, StdResult}; use vending_minter::helpers::MinterContract; @@ -9,9 +9,9 @@ use whitelist_immutable::helpers::WhitelistImmutableContract; pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { match msg { QueryMsg::AirdropEligible { eth_address } => { - to_binary(&query_airdrop_is_eligible(deps, eth_address)?) + to_json_binary(&query_airdrop_is_eligible(deps, eth_address)?) } - QueryMsg::GetMinter {} => to_binary(&query_minter(deps)?), + QueryMsg::GetMinter {} => to_json_binary(&query_minter(deps)?), } } diff --git a/test-suite/src/dydx_airdrop/setup/mock_minter_contract.rs b/test-suite/src/dydx_airdrop/setup/mock_minter_contract.rs index 97f35f899..c2b9123e0 100644 --- a/test-suite/src/dydx_airdrop/setup/mock_minter_contract.rs +++ b/test-suite/src/dydx_airdrop/setup/mock_minter_contract.rs @@ -1,7 +1,5 @@ -use cosmwasm_std::entry_point; -use cosmwasm_std::{ - to_binary, Binary, Coin, Deps, DepsMut, Env, MessageInfo, StdResult, Timestamp, -}; +use cosmwasm_std::{entry_point, to_json_binary}; +use cosmwasm_std::{Binary, Coin, Deps, DepsMut, Env, MessageInfo, StdResult, Timestamp}; use cw_multi_test::{Contract, ContractWrapper}; use dydx_airdrop::error::ContractError; use sg_std::{Response, StargazeMsgWrapper}; @@ -46,8 +44,8 @@ pub fn execute( #[cfg_attr(not(feature = "library"), entry_point)] pub fn query(_deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { match msg { - QueryMsg::Config {} => to_binary(&query_config()), - _ => to_binary("invalid"), + QueryMsg::Config {} => to_json_binary(&query_config()), + _ => to_json_binary("invalid"), } } diff --git a/test-suite/src/dydx_airdrop/setup/mock_whitelist_contract.rs b/test-suite/src/dydx_airdrop/setup/mock_whitelist_contract.rs index 6381e225c..66566fe8b 100644 --- a/test-suite/src/dydx_airdrop/setup/mock_whitelist_contract.rs +++ b/test-suite/src/dydx_airdrop/setup/mock_whitelist_contract.rs @@ -1,5 +1,5 @@ -use cosmwasm_std::entry_point; -use cosmwasm_std::{to_binary, Binary, Deps, DepsMut, Env, MessageInfo, StdResult}; +use cosmwasm_std::{entry_point, to_json_binary}; +use cosmwasm_std::{Binary, Deps, DepsMut, Env, MessageInfo, StdResult}; use cw_multi_test::{Contract, ContractWrapper}; use dydx_airdrop::error::ContractError; use sg_std::{Response, StargazeMsgWrapper}; @@ -31,7 +31,7 @@ pub fn execute( #[cfg_attr(not(feature = "library"), entry_point)] pub fn query(_deps: Deps, _env: Env, _msg: QueryMsg) -> StdResult { - to_binary("mock") + to_json_binary("mock") } fn execute_add_members() -> Result {