Supra Fungible Asset (FA) Module
Module Structure
module supra_framework::fungible_asset {
use supra_framework::aggregator_v2;
use supra_framework::create_signer;
use supra_framework::event;
use supra_framework::function_info;
use supra_framework::object;
use std::string;
use std::features;
use std::error;
use std::option;
use std::signer;
}Friend Modules
Supply and Validation Constrants
Core Data Structures
FungibleAsset
Metadata
FungibleStore
Supply Management
Reference Types
Dispatch Functions
Concurrent Balance Tracking
Untransferable Assets
Events
Utility Functions
Returns whether concurrent fungible supply is enabled by default.
Returns whether upgrading to concurrent fungible balance is allowed.
Returns whether concurrent fungible balance is enabled by default.
Returns whether the provided address has a store initialized.
Inline version of store existence check for internal use.
Returns whether the provided address has concurrent fungible balance initialized.
Checks whether the balance of a store is >= amount.
Friend function to check if address balance is at least the specified amount.
Core Functions
Asset Creation
add_fungibility
Reference Generation
generate_mint_ref
generate_burn_ref
generate_transfer_ref
generate_mutate_metadata_ref
Store Management
create_store
remove_store
Asset Operations
mint
mint_internal
mint_to
burn
burn_internal
burn_from
address_burn_from
Transfer Operations
transfer
withdraw
deposit
Sanity Check Functions
withdraw_sanity_check
deposit_sanity_check
Internal Operations
deposit_internal
withdraw_internal
Reference-Based Operations
withdraw_with_ref
deposit_with_ref
transfer_with_ref
Asset Manipulation
extract
merge
zero
destroy_zero
Metadata Accessor Functions
metadata_from_asset
store_metadata
amount
asset_metadata
mint_ref_metadata
transfer_ref_metadata
burn_ref_metadata
object_from_metadata_ref
View Functions
Returns the current supply from the metadata object.
Returns the maximum supply. Returns none if unlimited.
Returns the name of the fungible asset.
Returns the symbol of the fungible asset.
Returns the decimals from the metadata object.
Returns the icon URI from the metadata object.
Returns the project URI from the metadata object.
Returns the complete metadata struct from the metadata object.
Returns the balance of a given store.
Returns whether a store is frozen. Defaults to false if store doesn't exist.
Migration Support
Testing Support
Last updated
