pub trait Address {
    // Required methods
    fn from_contract_id(env: &Env, contract_id: &BytesN<32>) -> Address;
    fn random(env: &Env) -> Address;
}
Available on crate feature testutils only.

Required Methods§

source

fn from_contract_id(env: &Env, contract_id: &BytesN<32>) -> Address

Build an address from a contract identifier.

This is useful to create an Address of the registered contract.

source

fn random(env: &Env) -> Address

Create a random Address.

Implementation note: this always builds the contract addresses now. This shouldn’t normally matter though, as contracts should be agnostic to the underlying Address value.

Implementors§