pub trait CosmosRouter {
    type ExecC;
    type QueryC: CustomQuery;

    // Required methods
    fn execute(
        &self,
        api: &dyn Api,
        storage: &mut dyn Storage,
        block: &BlockInfo,
        sender: Addr,
        msg: CosmosMsg<Self::ExecC>
    ) -> AnyResult<AppResponse>;
    fn query(
        &self,
        api: &dyn Api,
        storage: &dyn Storage,
        block: &BlockInfo,
        request: QueryRequest<Self::QueryC>
    ) -> AnyResult<Binary>;
    fn sudo(
        &self,
        api: &dyn Api,
        storage: &mut dyn Storage,
        block: &BlockInfo,
        msg: SudoMsg
    ) -> AnyResult<AppResponse>;
}

Required Associated Types§

Required Methods§

source

fn execute( &self, api: &dyn Api, storage: &mut dyn Storage, block: &BlockInfo, sender: Addr, msg: CosmosMsg<Self::ExecC> ) -> AnyResult<AppResponse>

source

fn query( &self, api: &dyn Api, storage: &dyn Storage, block: &BlockInfo, request: QueryRequest<Self::QueryC> ) -> AnyResult<Binary>

source

fn sudo( &self, api: &dyn Api, storage: &mut dyn Storage, block: &BlockInfo, msg: SudoMsg ) -> AnyResult<AppResponse>

Implementors§

source§

impl<BankT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT> CosmosRouter for Router<BankT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT>where CustomT::ExecT: Debug + Clone + PartialEq + JsonSchema + DeserializeOwned + 'static, CustomT::QueryT: CustomQuery + DeserializeOwned + 'static, CustomT: Module, WasmT: Wasm<CustomT::ExecT, CustomT::QueryT>, BankT: Bank, StakingT: Staking, DistrT: Distribution, IbcT: Ibc, GovT: Gov,

§

type ExecC = <CustomT as Module>::ExecT

§

type QueryC = <CustomT as Module>::QueryT