Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
quasisamurai committed Sep 14, 2023
1 parent 57f7440 commit 22b6a2d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions contracts/before-send-hook/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ use crate::msg::{
TrackBeforeSendMsg,
};
use crate::state::{SUDO_RES_BLOCK, SUDO_RES_TRACK};
use cosmwasm_std::{entry_point, Deps, DepsMut, Env, MessageInfo, Response, StdResult};
use cosmwasm_std::{
entry_point, to_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult,
};

#[entry_point]
pub fn instantiate(
Expand All @@ -29,15 +31,15 @@ pub fn execute(
}

#[entry_point]
pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult<SudoResResponse> {
pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult<Binary> {
match msg {
QueryMsg::SudoResultBlockBefore {} => query_sudo_result_block_before(deps),
QueryMsg::SudoResultTrackBefore {} => query_sudo_result_track_before(deps),
QueryMsg::SudoResultBlockBefore {} => to_binary(&query_sudo_result_block_before(deps)?),
QueryMsg::SudoResultTrackBefore {} => to_binary(&query_sudo_result_track_before(deps)?),
}
}

#[entry_point]
pub fn sudo(deps: DepsMut, _env: Env, _info: MessageInfo, msg: SudoMsg) -> StdResult<Response> {
pub fn sudo(deps: DepsMut, _env: Env, msg: SudoMsg) -> StdResult<Response> {
match msg {
SudoMsg::TrackBeforeSendSudoMsg {
track_before_send_msg,
Expand Down

0 comments on commit 22b6a2d

Please sign in to comment.