Trait cosmwasm_vm::Querier

source ·
pub trait Querier {
    fn query_raw(
        &self,
        request: &[u8],
        gas_limit: u64
    ) -> BackendResult<SystemResult<ContractResult<Binary>>>; }

Required Methods§

source

fn query_raw(
    &self,
    request: &[u8],
    gas_limit: u64
) -> BackendResult<SystemResult<ContractResult<Binary>>>

This is all that must be implemented for the Querier. This allows us to pass through binary queries from one level to another without knowing the custom format, or we can decode it, with the knowledge of the allowed types.

The gas limit describes how much VM gas this particular query is allowed to comsume when measured separately from the rest of the contract. The returned gas info (in BackendResult) can exceed the gas limit in cases where the query could not be aborted exactly at the limit.

Implementors§