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§
fn addr_validate(&self, input: &str) -> BackendResult<()>
fn addr_canonicalize(&self, human: &str) -> BackendResult<Vec<u8>>
fn addr_humanize(&self, canonical: &[u8]) -> BackendResult<String>
Object Safety§
This trait is not object safe.