ODCinterfacesdataobject-interfaces

IFungibleTokenOperations

Provides the operations of the FungibleTokenDO to interact with fungible tokens and their associated data

balanceOf

function balanceOf(address account) external view returns (uint256)

Operation used to get the balance of an account

Parameters

NameTypeDescription
accountaddressThe account address

Return Values

NameTypeDescription
[0]uint256The balance of the account

totalSupply

function totalSupply() external view returns (uint256)

Operation used to get the total supply of the token

Return Values

NameTypeDescription
[0]uint256The total supply of the token

mint

function mint(address to, uint256 amount) external

Operation used to mint new tokens

Parameters

NameTypeDescription
toaddressThe account address to mint the tokens to
amountuint256The amount of tokens to mint

burn

function burn(address from, uint256 amount) external

Operation used to burn tokens

Parameters

NameTypeDescription
fromaddressThe account address to burn the tokens from
amountuint256The amount of tokens to burn

transfer

function transfer(address from, address to, uint256 amount) external

Operation used to transfer tokens

Parameters

NameTypeDescription
fromaddressThe account address to transfer the tokens from
toaddressThe account address to transfer the tokens to
amountuint256The amount of tokens to transfer

transferBatchMultipleTargets

function transferBatchMultipleTargets(address from, address[] to, uint256 amount) external

Operation used to transfer tokens to multiple targets

Parameters

NameTypeDescription
fromaddressThe account address to transfer the tokens from
toaddress[]The account addresses to transfer the tokens to
amountuint256The amount of tokens to transfer to each target

transferBatchMultipleTargetsAmounts

function transferBatchMultipleTargetsAmounts(address from, address[] to, uint256[] amount) external

Operation used to transfer tokens to multiple targets with different amounts

Parameters

NameTypeDescription
fromaddressThe account address to transfer the tokens from
toaddress[]The account addresses to transfer the tokens to
amountuint256[]The amounts of tokens to transfer

transferBatchIndependent

function transferBatchIndependent(address[] from, address[] to, uint256[] amount) external

Operation used to transfer tokens to multiple targets independently

Parameters

NameTypeDescription
fromaddress[]The account addresses to transfer the tokens from
toaddress[]The account addresses to transfer the tokens to
amountuint256[]The amounts of tokens to transfer

On this page