Function sway_libs::asset::base::_total_assets
pub fn _total_assets(total_assets_key: StorageKey<u64>) -> u64
Expand description
Returns the total number of individual assets for a contract.
Arguments
total_assets_key
: [StorageKey] - The location in storage that theu64
which represents the total assets is stored.
Returns
- [u64] - The number of assets that this contract has minted.
Number of Storage Accesses
- Reads:
1
Examples
use sway_libs::asset::base::_total_assets;
storage {
total_assets: u64 = 0,
}
fn foo() {
let assets = _total_assets(storage.total_assets);
assert(assets == 0);
}