OmnichainERC20DataManager
Contract for managing an Omnichain ERC20 token using a Omnichain Fungible Token Data Object
_This contract is used to manage an Omnichain ERC20 token where a Data Object contract is used to store the token data on that chain.
WrongParameters
Error thrown when the parameters are wrong
NotRegisteredAsOmnichainIncreaseBalanceHandler
Error thrown when the contract is not registered as an Omnichain Increase Balance handler
UnauthorizedCaller
Error thrown when the caller is not the Fungible Token Data Object
_datapoint
The Data Point identifier for the Fungible Token Data Object
omnichainFungibleDO
The Fungible Token Data Object
dataIndex
The Data Index implementation
_isRegisteredAsOmnichainIncreaseBalanceHandler
Variable to know if the contract is registered as an Omnichain Increase Balance handler
constructor
registerOmnichainIncreaseBalanceHandler
Function to register this contract as an omnichain increase balance handler NOTE: This function must be called after the contract is deployed
totalSupply
Returns the value of tokens in existence.
balanceOf
Returns the value of tokens owned by account
.
afterOmnichainFungibleTokenIncreaseBalanceOnTargetChain
Function called after a token transfer on target chain
Parameters
Name | Type | Description |
---|---|---|
from | OmnichainAddress | The address from which the token was transferred |
to | address | The address to which the token was transferred |
amount | uint256 | The amount of the token transferred |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | bool True if the callback was successful, false otherwise |
_checkMinter
SHOULD throw an error if the sender is not allowed to mint