Trait cosmwasm_vm::BackendApi

source ·
pub trait BackendApi: Clone + Send {
    // Required methods
    fn addr_validate(&self, input: &str) -> BackendResult<()>;
    fn addr_canonicalize(&self, human: &str) -> BackendResult<Vec<u8>>;
    fn addr_humanize(&self, canonical: &[u8]) -> BackendResult<String>;
}
Expand description

Callbacks to system functions defined outside of the wasm modules. This is a trait to allow Mocks in the test code.

Currently it just supports address conversion, we could add eg. crypto functions here. These should all be pure (stateless) functions. If you need state, you probably want to use the Querier.

Required Methods§

source

fn addr_validate(&self, input: &str) -> BackendResult<()>

source

fn addr_canonicalize(&self, human: &str) -> BackendResult<Vec<u8>>

source

fn addr_humanize(&self, canonical: &[u8]) -> BackendResult<String>

Object Safety§

This trait is not object safe.

Implementors§