ODCinterfacesdataobject-interfaces
IFungibleFractionsOperations
Provides the operations of the FungibleFractionsDO to interact with fungible fractions tokens and their associated data
balanceOf
Operation used to get the balance of an account
Parameters
Name | Type | Description |
---|---|---|
account | address | The account address |
id | uint256 | The id of the token |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The balance of the account |
balanceOfBatch
Operation used to get the balance of an account
Parameters
Name | Type | Description |
---|---|---|
account | address | The account address |
ids | uint256[] | The ids of the tokens |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256[] | The balance of the account |
balanceOfBatchAccounts
Operation used to get the balance of multiple accounts
Parameters
Name | Type | Description |
---|---|---|
accounts | address[] | The account addresses |
ids | uint256[] | The ids of the tokens |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256[] | The balance of the accounts |
totalSupply
Operation used to get the total supply of a token
Parameters
Name | Type | Description |
---|---|---|
id | uint256 | The id of the token |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The total supply of the token |
totalSupplyAll
Operation used to get the total supply of all ids tokens
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The total supply of all ids tokens |
exists
Operation used to check if an id exists
Parameters
Name | Type | Description |
---|---|---|
id | uint256 | The id of the token |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | True if the id exists, false otherwise |
transferFrom
Operation used to transfer tokens from one account to another
Parameters
Name | Type | Description |
---|---|---|
from | address | The account to transfer from |
to | address | The account to transfer to |
id | uint256 | The id of the token |
value | uint256 | The amount of tokens to transfer |
batchTransferFrom
Operation used to transfer tokens from one account to another
Parameters
Name | Type | Description |
---|---|---|
from | address | The account to transfer from |
to | address | The account to transfer to |
ids | uint256[] | The ids of the tokens |
values | uint256[] | The amounts of tokens to transfer |
mint
Operation used to mint tokens
Parameters
Name | Type | Description |
---|---|---|
to | address | The account to mint to |
id | uint256 | The id of the token |
value | uint256 | The amount of tokens to mint |
burn
Operation used to burn tokens
Parameters
Name | Type | Description |
---|---|---|
from | address | The account to burn from |
id | uint256 | The id of the token |
value | uint256 | The amount of tokens to burn |
batchMint
Operation used to mint tokens
Parameters
Name | Type | Description |
---|---|---|
to | address | The account to mint to |
ids | uint256[] | The ids of the tokens |
values | uint256[] | The amounts of tokens to mint |
batchBurn
Operation used to burn tokens
Parameters
Name | Type | Description |
---|---|---|
from | address | The account to burn from |
ids | uint256[] | The ids of the tokens |
values | uint256[] | The amounts of tokens to burn |