pub trait StateInterface: Clone {
    // Required methods
    fn get_address(&self, contract_id: &str) -> Result<Addr, BootError>;
    fn set_address(&mut self, contract_id: &str, address: &Addr);
    fn get_code_id(&self, contract_id: &str) -> Result<u64, BootError>;
    fn set_code_id(&mut self, contract_id: &str, code_id: u64);
    fn get_all_addresses(&self) -> Result<HashMap<String, Addr>, BootError>;
    fn get_all_code_ids(&self) -> Result<HashMap<String, u64>, BootError>;
}
Expand description

Interface for setting the local state of the contracts on a chain

Required Methods§

source

fn get_address(&self, contract_id: &str) -> Result<Addr, BootError>

source

fn set_address(&mut self, contract_id: &str, address: &Addr)

source

fn get_code_id(&self, contract_id: &str) -> Result<u64, BootError>

source

fn set_code_id(&mut self, contract_id: &str, code_id: u64)

source

fn get_all_addresses(&self) -> Result<HashMap<String, Addr>, BootError>

source

fn get_all_code_ids(&self) -> Result<HashMap<String, u64>, BootError>

Implementations on Foreign Types§

source§

impl<S: StateInterface> StateInterface for Rc<RefCell<S>>

source§

fn get_address(&self, contract_id: &str) -> Result<Addr, BootError>

source§

fn set_address(&mut self, contract_id: &str, address: &Addr)

source§

fn get_code_id(&self, contract_id: &str) -> Result<u64, BootError>

source§

fn set_code_id(&mut self, contract_id: &str, code_id: u64)

source§

fn get_all_addresses(&self) -> Result<HashMap<String, Addr>, BootError>

source§

fn get_all_code_ids(&self) -> Result<HashMap<String, u64>, BootError>

source§

impl StateInterface for Rc<DaemonState>

source§

fn get_code_id(&self, contract_id: &str) -> Result<u64, BootError>

Get the locally-saved version of the contract’s version on this network

source§

fn set_code_id(&mut self, contract_id: &str, code_id: u64)

Set the locally-saved version of the contract’s latest version on this network

source§

fn get_address(&self, contract_id: &str) -> Result<Addr, BootError>

source§

fn set_address(&mut self, contract_id: &str, address: &Addr)

source§

fn get_all_addresses(&self) -> Result<HashMap<String, Addr>, BootError>

source§

fn get_all_code_ids(&self) -> Result<HashMap<String, u64>, BootError>

Implementors§