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

NameTypeDescription
struct DpData3 {
  uint256 localMintBurnSupplyAll;
  mapping(uint256 => uint256) localMintBurnSupply;
}

_dispatchRead

function _dispatchRead(DataPoint dp, bytes4 operation, bytes data) internal view virtual returns (bytes)

_localMintBurnSupplyAll

function _localMintBurnSupplyAll(DataPoint dp) internal view returns (uint256)

Internal function used to get count of all minted and not burned tokens on current chain of all ids

Parameters

NameTypeDescription
dpDataPointDataPoint identifier

Return Values

NameTypeDescription
[0]uint256Difference between tokens minted and burned on current chain of all ids

_localMintBurnSupply

function _localMintBurnSupply(DataPoint dp, uint256 id) internal view returns (uint256)

Internal function used to get count of all minted and not burned tokens on current chain of a specific id

Parameters

NameTypeDescription
dpDataPointDataPoint identifier
iduint256Id of the token

Return Values

NameTypeDescription
[0]uint256Difference between tokens minted and burned on current chain of the id

_mint

function _mint(DataPoint dp, address to, uint256 id, uint256 value) internal virtual

Function used to mint tokens

Parameters

NameTypeDescription
dpDataPointThe DataPoint identifier
toaddressThe account to mint to
iduint256The id of the token
valueuint256The amount of tokens to mint

_burn

function _burn(DataPoint dp, address from, uint256 id, uint256 value) internal virtual

Function used to burn tokens

Parameters

NameTypeDescription
dpDataPointThe DataPoint identifier
fromaddressThe account to burn from
iduint256The id of the token
valueuint256The amount of tokens to burn

_batchMint

function _batchMint(DataPoint dp, address to, uint256[] ids, uint256[] values) internal virtual

Function used to mint multiple tokens at once

Parameters

NameTypeDescription
dpDataPointThe DataPoint identifier
toaddressThe account to mint to
idsuint256[]The ids of the tokens
valuesuint256[]The amounts of tokens to mint

_batchBurn

function _batchBurn(DataPoint dp, address from, uint256[] ids, uint256[] values) internal virtual

Operation used to burn multiple tokens at once

Parameters

NameTypeDescription
dpDataPointThe DataPoint identifier
fromaddressThe account to burn from
idsuint256[]The ids of the tokens
valuesuint256[]The amounts of tokens to burn

_tryDpData3

function _tryDpData3(DataPoint dp) internal view returns (bool, struct OmnichainFungibleFractionsWithLocalMintBurnSupplyDO.DpData3)

_dpData3

function _dpData3(DataPoint dp) internal returns (struct OmnichainFungibleFractionsWithLocalMintBurnSupplyDO.DpData3)

On this page