pub trait TrackingCopyExt<R> {
type Error;
Show 20 methods
// Required methods
fn read_account_key(
&mut self,
account_hash: AccountHash,
) -> Result<Key, Self::Error>;
fn get_block_time(&self) -> Result<Option<BlockTime>, Self::Error>;
fn get_balance_hold_config(
&self,
hold_kind: BalanceHoldAddrTag,
) -> Result<Option<(BlockTime, HoldBalanceHandling, u64)>, Self::Error>;
fn get_purse_balance_key(&self, purse_key: Key) -> Result<Key, Self::Error>;
fn get_balance_hold_addresses(
&self,
purse_addr: URefAddr,
) -> Result<Vec<BalanceHoldAddr>, Self::Error>;
fn get_total_balance(&self, key: Key) -> Result<Motes, Self::Error>;
fn get_available_balance(
&mut self,
balance_key: Key,
) -> Result<Motes, Self::Error>;
fn get_purse_balance_key_with_proof(
&self,
purse_key: Key,
) -> Result<(Key, TrieMerkleProof<Key, StoredValue>), Self::Error>;
fn get_total_balance_with_proof(
&self,
balance_key: Key,
) -> Result<(U512, TrieMerkleProof<Key, StoredValue>), Self::Error>;
fn clear_expired_balance_holds(
&mut self,
purse_addr: URefAddr,
filter: Vec<(BalanceHoldAddrTag, HoldsEpoch)>,
) -> Result<(), Self::Error>;
fn get_balance_holds(
&mut self,
purse_addr: URefAddr,
block_time: BlockTime,
interval: u64,
) -> Result<BTreeMap<BlockTime, BalanceHolds>, Self::Error>;
fn get_balance_holds_with_proof(
&self,
purse_addr: URefAddr,
) -> Result<BTreeMap<BlockTime, BalanceHoldsWithProof>, Self::Error>;
fn get_message_topics(
&self,
entity_addr: EntityAddr,
) -> Result<MessageTopics, Self::Error>;
fn get_named_keys(
&self,
entity_addr: EntityAddr,
) -> Result<NamedKeys, Self::Error>;
fn get_v1_entry_points(
&self,
entity_addr: EntityAddr,
) -> Result<EntryPoints, Self::Error>;
fn get_package(
&mut self,
package_hash: HashAddr,
) -> Result<Package, Self::Error>;
fn get_contract(
&mut self,
contract_hash: ContractHash,
) -> Result<Contract, Self::Error>;
fn get_system_entity_registry(
&self,
) -> Result<SystemHashRegistry, Self::Error>;
fn get_checksum_registry(
&mut self,
) -> Result<Option<ChecksumRegistry>, Self::Error>;
fn get_byte_code(
&mut self,
byte_code_hash: ByteCodeHash,
) -> Result<ByteCode, Self::Error>;
}Expand description
Higher-level operations on the state via a TrackingCopy.
Required Associated Types§
Required Methods§
Sourcefn read_account_key(
&mut self,
account_hash: AccountHash,
) -> Result<Key, Self::Error>
fn read_account_key( &mut self, account_hash: AccountHash, ) -> Result<Key, Self::Error>
Reads the entity key for a given account hash.
Sourcefn get_block_time(&self) -> Result<Option<BlockTime>, Self::Error>
fn get_block_time(&self) -> Result<Option<BlockTime>, Self::Error>
Returns block time associated with checked out root hash.
Sourcefn get_balance_hold_config(
&self,
hold_kind: BalanceHoldAddrTag,
) -> Result<Option<(BlockTime, HoldBalanceHandling, u64)>, Self::Error>
fn get_balance_hold_config( &self, hold_kind: BalanceHoldAddrTag, ) -> Result<Option<(BlockTime, HoldBalanceHandling, u64)>, Self::Error>
Returns balance hold configuration settings for imputed kind of balance hold.
Sourcefn get_purse_balance_key(&self, purse_key: Key) -> Result<Key, Self::Error>
fn get_purse_balance_key(&self, purse_key: Key) -> Result<Key, Self::Error>
Gets the purse balance key for a given purse.
Sourcefn get_balance_hold_addresses(
&self,
purse_addr: URefAddr,
) -> Result<Vec<BalanceHoldAddr>, Self::Error>
fn get_balance_hold_addresses( &self, purse_addr: URefAddr, ) -> Result<Vec<BalanceHoldAddr>, Self::Error>
Gets the balance hold keys for the imputed purse (if any).
Sourcefn get_available_balance(
&mut self,
balance_key: Key,
) -> Result<Motes, Self::Error>
fn get_available_balance( &mut self, balance_key: Key, ) -> Result<Motes, Self::Error>
Returns the available balance, considering any holds from holds_epoch to now.
Sourcefn get_purse_balance_key_with_proof(
&self,
purse_key: Key,
) -> Result<(Key, TrieMerkleProof<Key, StoredValue>), Self::Error>
fn get_purse_balance_key_with_proof( &self, purse_key: Key, ) -> Result<(Key, TrieMerkleProof<Key, StoredValue>), Self::Error>
Gets the purse balance key for a given purse and provides a Merkle proof.
Sourcefn get_total_balance_with_proof(
&self,
balance_key: Key,
) -> Result<(U512, TrieMerkleProof<Key, StoredValue>), Self::Error>
fn get_total_balance_with_proof( &self, balance_key: Key, ) -> Result<(U512, TrieMerkleProof<Key, StoredValue>), Self::Error>
Gets the balance at a given balance key and provides a Merkle proof.
Sourcefn clear_expired_balance_holds(
&mut self,
purse_addr: URefAddr,
filter: Vec<(BalanceHoldAddrTag, HoldsEpoch)>,
) -> Result<(), Self::Error>
fn clear_expired_balance_holds( &mut self, purse_addr: URefAddr, filter: Vec<(BalanceHoldAddrTag, HoldsEpoch)>, ) -> Result<(), Self::Error>
Clear expired balance holds.
Sourcefn get_balance_holds(
&mut self,
purse_addr: URefAddr,
block_time: BlockTime,
interval: u64,
) -> Result<BTreeMap<BlockTime, BalanceHolds>, Self::Error>
fn get_balance_holds( &mut self, purse_addr: URefAddr, block_time: BlockTime, interval: u64, ) -> Result<BTreeMap<BlockTime, BalanceHolds>, Self::Error>
Gets the balance holds for a given balance, without Merkle proofs.
Sourcefn get_balance_holds_with_proof(
&self,
purse_addr: URefAddr,
) -> Result<BTreeMap<BlockTime, BalanceHoldsWithProof>, Self::Error>
fn get_balance_holds_with_proof( &self, purse_addr: URefAddr, ) -> Result<BTreeMap<BlockTime, BalanceHoldsWithProof>, Self::Error>
Gets the balance holds for a given balance, with Merkle proofs.
Sourcefn get_message_topics(
&self,
entity_addr: EntityAddr,
) -> Result<MessageTopics, Self::Error>
fn get_message_topics( &self, entity_addr: EntityAddr, ) -> Result<MessageTopics, Self::Error>
Returns the collection of message topics (if any) for a given HashAddr.
Sourcefn get_named_keys(
&self,
entity_addr: EntityAddr,
) -> Result<NamedKeys, Self::Error>
fn get_named_keys( &self, entity_addr: EntityAddr, ) -> Result<NamedKeys, Self::Error>
Returns the collection of named keys for a given AddressableEntity.
Sourcefn get_v1_entry_points(
&self,
entity_addr: EntityAddr,
) -> Result<EntryPoints, Self::Error>
fn get_v1_entry_points( &self, entity_addr: EntityAddr, ) -> Result<EntryPoints, Self::Error>
Returns the collection of entry points for a given AddresableEntity.
Sourcefn get_package(
&mut self,
package_hash: HashAddr,
) -> Result<Package, Self::Error>
fn get_package( &mut self, package_hash: HashAddr, ) -> Result<Package, Self::Error>
Gets a package by hash.
Sourcefn get_contract(
&mut self,
contract_hash: ContractHash,
) -> Result<Contract, Self::Error>
fn get_contract( &mut self, contract_hash: ContractHash, ) -> Result<Contract, Self::Error>
Get a Contract record.
Sourcefn get_system_entity_registry(&self) -> Result<SystemHashRegistry, Self::Error>
fn get_system_entity_registry(&self) -> Result<SystemHashRegistry, Self::Error>
Gets the system entity registry.
Sourcefn get_checksum_registry(
&mut self,
) -> Result<Option<ChecksumRegistry>, Self::Error>
fn get_checksum_registry( &mut self, ) -> Result<Option<ChecksumRegistry>, Self::Error>
Gets the system checksum registry.
Sourcefn get_byte_code(
&mut self,
byte_code_hash: ByteCodeHash,
) -> Result<ByteCode, Self::Error>
fn get_byte_code( &mut self, byte_code_hash: ByteCodeHash, ) -> Result<ByteCode, Self::Error>
Gets byte code by hash.