DeBridgeToken
ERC20 token that is used as wrapped asset to represent the native token value on the other chains.
Variables
MINTER_ROLE
Minter role identifier
PAUSER_ROLE
Pauser role identifier
DOMAIN_SEPARATOR
Domain separator as described in EIP-712
PERMIT_TYPEHASH
Typehash as described in EIP-712. =keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
nonces
Transfers counter
_decimals
Asset's decimals
Functions
initialize
Constructor that initializes the most important configurations.
Parameters:
Name | Type | Description |
---|---|---|
| string | Asset's name. |
| string | Asset's symbol. |
| uint8 | Asset's decimals. |
| address | Address to set as asset's admin. |
| address[] | The accounts allowed to int new tokens. |
mint
Issues new tokens.
Parameters:
Name | Type | Description |
---|---|---|
| address | Token's receiver. |
| uint256 | Amount to be minted. |
burn
Destroys existing tokens.
Parameters:
Name | Type | Description |
---|---|---|
| uint256 | Amount to be burnt. |
permit
Approves the spender by signature.
Parameters:
Name | Type | Description |
---|---|---|
| address | Token's owner. |
| address | Account to be approved. |
| uint256 | Amount to be approved. |
| uint256 | The permit valid until. |
| uint8 | Signature part. |
| bytes32 | Signature part. |
| bytes32 | Signature part. |
decimals
Asset's decimals
pause
Pauses all token transfers. The caller must have the PAUSER_ROLE
.
unpause
Unpauses all token transfers. The caller must have the PAUSER_ROLE
.
_beforeTokenTransfer
Last updated