ODCdataobjectsomnichain
OmnichainFungibleFractionsWithLocalMintBurnSupplyDO
This DO should be used only on a chain where mint/burn happens exclusively (no other chains are allowed to mint/burn tokens for this DP)
DpData3
Data structure for storing local mint & burn supply
Parameters
| Name | Type | Description |
|---|
_dispatchRead
_localMintBurnSupplyAll
Internal function used to get count of all minted and not burned tokens on current chain of all ids
Parameters
| Name | Type | Description |
|---|---|---|
| dp | DataPoint | DataPoint identifier |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | uint256 | Difference between tokens minted and burned on current chain of all ids |
_localMintBurnSupply
Internal function used to get count of all minted and not burned tokens on current chain of a specific id
Parameters
| Name | Type | Description |
|---|---|---|
| dp | DataPoint | DataPoint identifier |
| id | uint256 | Id of the token |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | uint256 | Difference between tokens minted and burned on current chain of the id |
_mint
Function used to mint tokens
Parameters
| Name | Type | Description |
|---|---|---|
| dp | DataPoint | The DataPoint identifier |
| to | address | The account to mint to |
| id | uint256 | The id of the token |
| value | uint256 | The amount of tokens to mint |
_burn
Function used to burn tokens
Parameters
| Name | Type | Description |
|---|---|---|
| dp | DataPoint | The DataPoint identifier |
| from | address | The account to burn from |
| id | uint256 | The id of the token |
| value | uint256 | The amount of tokens to burn |
_batchMint
Function used to mint multiple tokens at once
Parameters
| Name | Type | Description |
|---|---|---|
| dp | DataPoint | The DataPoint identifier |
| 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 multiple tokens at once
Parameters
| Name | Type | Description |
|---|---|---|
| dp | DataPoint | The DataPoint identifier |
| from | address | The account to burn from |
| ids | uint256[] | The ids of the tokens |
| values | uint256[] | The amounts of tokens to burn |

