ODCdataobjectsomnichain

OmnichainFungibleTokenWithLocalMintBurnSupplyDO

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)

DpData2

Data structure for storing local mint & burn supply

Parameters

NameTypeDescription
struct DpData2 {
  uint256 localMintBurnSupply;
}

_dispatchRead

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

_localMintBurnSupply

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

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

Parameters

NameTypeDescription
dpDataPointDataPoint identifier

Return Values

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

_mint

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

Function used to mint new tokens

Parameters

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

_burn

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

Function used to burn tokens

Parameters

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

_tryDpData2

function _tryDpData2(DataPoint dp) internal view returns (bool, struct OmnichainFungibleTokenWithLocalMintBurnSupplyDO.DpData2)

_dpData2

function _dpData2(DataPoint dp) internal returns (struct OmnichainFungibleTokenWithLocalMintBurnSupplyDO.DpData2)

On this page