Trait fuel_vm::storage::ContractsAssetsStorage
source · pub trait ContractsAssetsStorage: MerkleRootStorage<ContractId, ContractsAssets> {
// Provided methods
fn merkle_contract_asset_id_balance(
&self,
id: &ContractId,
asset_id: &AssetId
) -> Result<Option<Word>, Self::Error> { ... }
fn merkle_contract_asset_id_balance_insert(
&mut self,
contract: &ContractId,
asset_id: &AssetId,
value: Word
) -> Result<Option<Word>, Self::Error> { ... }
}
Expand description
Storage operations for contract assets.
Provided Methods§
sourcefn merkle_contract_asset_id_balance(
&self,
id: &ContractId,
asset_id: &AssetId
) -> Result<Option<Word>, Self::Error>
fn merkle_contract_asset_id_balance( &self, id: &ContractId, asset_id: &AssetId ) -> Result<Option<Word>, Self::Error>
Fetch the balance of an asset ID in a contract storage.
sourcefn merkle_contract_asset_id_balance_insert(
&mut self,
contract: &ContractId,
asset_id: &AssetId,
value: Word
) -> Result<Option<Word>, Self::Error>
fn merkle_contract_asset_id_balance_insert( &mut self, contract: &ContractId, asset_id: &AssetId, value: Word ) -> Result<Option<Word>, Self::Error>
Update the balance of an asset ID in a contract storage.