pub trait Stargate {
    // Provided methods
    fn execute<ExecC, QueryC>(
        &self,
        api: &dyn Api,
        storage: &mut dyn Storage,
        router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
        block: &BlockInfo,
        sender: Addr,
        type_url: String,
        value: Binary
    ) -> AnyResult<AppResponse>
       where ExecC: Debug + Clone + PartialEq + JsonSchema + DeserializeOwned + 'static,
             QueryC: CustomQuery + DeserializeOwned + 'static { ... }
    fn query(
        &self,
        api: &dyn Api,
        storage: &dyn Storage,
        querier: &dyn Querier,
        block: &BlockInfo,
        path: String,
        data: Binary
    ) -> AnyResult<Binary> { ... }
}
Expand description

Stargate interface.

This trait provides the default behaviour for all functions that is equal to StargateFailing implementation.

Provided Methods§

source

fn execute<ExecC, QueryC>( &self, api: &dyn Api, storage: &mut dyn Storage, router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>, block: &BlockInfo, sender: Addr, type_url: String, value: Binary ) -> AnyResult<AppResponse>
where ExecC: Debug + Clone + PartialEq + JsonSchema + DeserializeOwned + 'static, QueryC: CustomQuery + DeserializeOwned + 'static,

Processes stargate messages.

The CosmosMsg::Stargate message is unwrapped before processing. The type_url and value attributes of CosmosMsg::Stargate are passed directly to this handler.

source

fn query( &self, api: &dyn Api, storage: &dyn Storage, querier: &dyn Querier, block: &BlockInfo, path: String, data: Binary ) -> AnyResult<Binary>

Processes stargate queries.

The QueryRequest::Stargate query request is unwrapped before processing. The path and data attributes of QueryRequest::Stargate are passed directly to this handler.

Object Safety§

This trait is not object safe.

Implementors§