pub trait TrackingCopyExt<R> {
    type Error;

    // Required methods
    fn get_account(
        &mut self,
        correlation_id: CorrelationId,
        account_hash: AccountHash
    ) -> Result<Account, Self::Error>;
    fn read_account(
        &mut self,
        correlation_id: CorrelationId,
        account_hash: AccountHash
    ) -> Result<Account, Self::Error>;
    fn get_purse_balance_key(
        &self,
        correlation_id: CorrelationId,
        purse_key: Key
    ) -> Result<Key, Self::Error>;
    fn get_purse_balance(
        &self,
        correlation_id: CorrelationId,
        balance_key: Key
    ) -> Result<Motes, Self::Error>;
    fn get_purse_balance_key_with_proof(
        &self,
        correlation_id: CorrelationId,
        purse_key: Key
    ) -> Result<(Key, TrieMerkleProof<Key, StoredValue>), Self::Error>;
    fn get_purse_balance_with_proof(
        &self,
        correlation_id: CorrelationId,
        balance_key: Key
    ) -> Result<(Motes, TrieMerkleProof<Key, StoredValue>), Self::Error>;
    fn get_contract_wasm(
        &mut self,
        correlation_id: CorrelationId,
        contract_wasm_hash: ContractWasmHash
    ) -> Result<ContractWasm, Self::Error>;
    fn get_contract(
        &mut self,
        correlation_id: CorrelationId,
        contract_hash: ContractHash
    ) -> Result<Contract, Self::Error>;
    fn get_contract_package(
        &mut self,
        correlation_id: CorrelationId,
        contract_package_hash: ContractPackageHash
    ) -> Result<ContractPackage, Self::Error>;
    fn get_system_contracts(
        &mut self,
        correlation_id: CorrelationId
    ) -> Result<SystemContractRegistry, Self::Error>;
    fn get_checksum_registry(
        &mut self,
        correlation_id: CorrelationId
    ) -> Result<Option<ChecksumRegistry>, Self::Error>;
}
Expand description

Higher-level operations on the state via a TrackingCopy.

Required Associated Types§

source

type Error

The type for the returned errors.

Required Methods§

source

fn get_account( &mut self, correlation_id: CorrelationId, account_hash: AccountHash ) -> Result<Account, Self::Error>

Gets the account at a given account address.

source

fn read_account( &mut self, correlation_id: CorrelationId, account_hash: AccountHash ) -> Result<Account, Self::Error>

Reads the account at a given account address.

source

fn get_purse_balance_key( &self, correlation_id: CorrelationId, purse_key: Key ) -> Result<Key, Self::Error>

Gets the purse balance key for a given purse id

source

fn get_purse_balance( &self, correlation_id: CorrelationId, balance_key: Key ) -> Result<Motes, Self::Error>

Gets the balance at a given balance key.

source

fn get_purse_balance_key_with_proof( &self, correlation_id: CorrelationId, purse_key: Key ) -> Result<(Key, TrieMerkleProof<Key, StoredValue>), Self::Error>

Gets the purse balance key for a given purse id and provides a Merkle proof.

source

fn get_purse_balance_with_proof( &self, correlation_id: CorrelationId, balance_key: Key ) -> Result<(Motes, TrieMerkleProof<Key, StoredValue>), Self::Error>

Gets the balance at a given balance key and provides a Merkle proof.

source

fn get_contract_wasm( &mut self, correlation_id: CorrelationId, contract_wasm_hash: ContractWasmHash ) -> Result<ContractWasm, Self::Error>

Gets a contract by Key.

source

fn get_contract( &mut self, correlation_id: CorrelationId, contract_hash: ContractHash ) -> Result<Contract, Self::Error>

Gets a contract header by Key.

source

fn get_contract_package( &mut self, correlation_id: CorrelationId, contract_package_hash: ContractPackageHash ) -> Result<ContractPackage, Self::Error>

Gets a contract package by Key.

source

fn get_system_contracts( &mut self, correlation_id: CorrelationId ) -> Result<SystemContractRegistry, Self::Error>

Gets the system contract registry.

source

fn get_checksum_registry( &mut self, correlation_id: CorrelationId ) -> Result<Option<ChecksumRegistry>, Self::Error>

Gets the system checksum registry.

Implementors§