[−][src]Trait cosmwasm_vm::Api
Api are 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.
We can use feature flags to opt-in to non-essential methods for backwards compatibility in systems that don't have them all.
Required methods
pub fn canonical_address(
&self,
human: &HumanAddr
) -> BackendResult<CanonicalAddr>
&self,
human: &HumanAddr
) -> BackendResult<CanonicalAddr>
pub fn human_address(
&self,
canonical: &CanonicalAddr
) -> BackendResult<HumanAddr>
&self,
canonical: &CanonicalAddr
) -> BackendResult<HumanAddr>
Implementors
impl Api for MockApi[src]
pub fn canonical_address(
&self,
human: &HumanAddr
) -> BackendResult<CanonicalAddr>[src]
&self,
human: &HumanAddr
) -> BackendResult<CanonicalAddr>
pub fn human_address(
&self,
canonical: &CanonicalAddr
) -> BackendResult<HumanAddr>[src]
&self,
canonical: &CanonicalAddr
) -> BackendResult<HumanAddr>