fuel_vm/storage/contracts_assets.rs
1use crate::double_key;
2use fuel_storage::Mappable;
3use fuel_types::{
4 AssetId,
5 ContractId,
6 Word,
7};
8
9/// The storage table for contract's assets balances.
10///
11/// Lifetime is for optimization to avoid `clone`.
12pub struct ContractsAssets;
13
14impl Mappable for ContractsAssets {
15 type Key = Self::OwnedKey;
16 type OwnedKey = ContractsAssetKey;
17 type OwnedValue = Self::Value;
18 type Value = Word;
19}
20
21double_key!(
22 ContractsAssetKey,
23 ContractId,
24 contract_id,
25 AssetId,
26 asset_id
27);