pub trait ContractHarness {
    // Required methods
    fn instantiate(
        &self,
        deps: DepsMut<'_>,
        env: Env,
        info: MessageInfo,
        msg: Binary
    ) -> AnyResult<Response>;
    fn execute(
        &self,
        deps: DepsMut<'_>,
        env: Env,
        info: MessageInfo,
        msg: Binary
    ) -> AnyResult<Response>;
    fn query(&self, deps: Deps<'_>, env: Env, msg: Binary) -> AnyResult<Binary>;

    // Provided method
    fn reply(
        &self,
        _deps: DepsMut<'_>,
        _env: Env,
        _reply: Reply
    ) -> AnyResult<Response> { ... }
}
Expand description

The trait that allows the ensemble to execute your contract. Must be implemented for each contract that will participate in the shared execution. Usually implemented by calling the respective contract function for each method of the trait by passing down the parameters of the method and calling cosmwasm_std::from_binary() on the msg parameter. It can also be used to implement a mock contract directly.

Required Methods§

source

fn instantiate( &self, deps: DepsMut<'_>, env: Env, info: MessageInfo, msg: Binary ) -> AnyResult<Response>

source

fn execute( &self, deps: DepsMut<'_>, env: Env, info: MessageInfo, msg: Binary ) -> AnyResult<Response>

source

fn query(&self, deps: Deps<'_>, env: Env, msg: Binary) -> AnyResult<Binary>

Provided Methods§

source

fn reply( &self, _deps: DepsMut<'_>, _env: Env, _reply: Reply ) -> AnyResult<Response>

Implementors§