Struct cw_multi_test::WasmKeeper [−][src]
pub struct WasmKeeper<ExecC, QueryC> { /* fields omitted */ }
Implementations
impl<ExecC, QueryC> WasmKeeper<ExecC, QueryC> where
ExecC: Clone + Debug + PartialEq + JsonSchema + DeserializeOwned + 'static,
QueryC: CustomQuery + DeserializeOwned + 'static,
impl<ExecC, QueryC> WasmKeeper<ExecC, QueryC> where
ExecC: Clone + Debug + PartialEq + JsonSchema + DeserializeOwned + 'static,
QueryC: CustomQuery + DeserializeOwned + 'static,
pub fn query_smart(
&self,
address: Addr,
api: &dyn Api,
storage: &dyn Storage,
querier: &dyn Querier,
block: &BlockInfo,
msg: Vec<u8>
) -> AnyResult<Binary>
This just creates an address and empty storage instance, returning the new address You must call init after this to set up the contract properly. These are separated into two steps to have cleaner return values.
pub fn call_execute(
&self,
api: &dyn Api,
storage: &mut dyn Storage,
address: Addr,
router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
block: &BlockInfo,
info: MessageInfo,
msg: Vec<u8>
) -> AnyResult<Response<ExecC>>
pub fn call_instantiate(
&self,
address: Addr,
api: &dyn Api,
storage: &mut dyn Storage,
router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
block: &BlockInfo,
info: MessageInfo,
msg: Vec<u8>
) -> AnyResult<Response<ExecC>>
pub fn call_reply(
&self,
address: Addr,
api: &dyn Api,
storage: &mut dyn Storage,
router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
block: &BlockInfo,
reply: Reply
) -> AnyResult<Response<ExecC>>
pub fn call_sudo(
&self,
address: Addr,
api: &dyn Api,
storage: &mut dyn Storage,
router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
block: &BlockInfo,
msg: Vec<u8>
) -> AnyResult<Response<ExecC>>
pub fn call_migrate(
&self,
address: Addr,
api: &dyn Api,
storage: &mut dyn Storage,
router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
block: &BlockInfo,
msg: Vec<u8>
) -> AnyResult<Response<ExecC>>
Trait Implementations
impl<ExecC, QueryC> Wasm<ExecC, QueryC> for WasmKeeper<ExecC, QueryC> where
ExecC: Clone + Debug + PartialEq + JsonSchema + DeserializeOwned + 'static,
QueryC: CustomQuery + DeserializeOwned + 'static,
impl<ExecC, QueryC> Wasm<ExecC, QueryC> for WasmKeeper<ExecC, QueryC> where
ExecC: Clone + Debug + PartialEq + JsonSchema + DeserializeOwned + 'static,
QueryC: CustomQuery + DeserializeOwned + 'static,
Handles all WasmQuery requests
fn execute(
&self,
api: &dyn Api,
storage: &mut dyn Storage,
router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
block: &BlockInfo,
sender: Addr,
msg: WasmMsg
) -> AnyResult<AppResponse>
fn execute(
&self,
api: &dyn Api,
storage: &mut dyn Storage,
router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
block: &BlockInfo,
sender: Addr,
msg: WasmMsg
) -> AnyResult<AppResponse>
Handles all WasmMsg messages
fn sudo(
&self,
api: &dyn Api,
contract: Addr,
storage: &mut dyn Storage,
router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
block: &BlockInfo,
msg: Binary
) -> AnyResult<AppResponse>
fn sudo(
&self,
api: &dyn Api,
contract: Addr,
storage: &mut dyn Storage,
router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
block: &BlockInfo,
msg: Binary
) -> AnyResult<AppResponse>
Admin interface, cannot be called via CosmosMsg