Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.debridge.com/llms.txt

Use this file to discover all available pages before exploring further.

ERC20 token that is used as wrapped asset to represent the native token value on the other chains.

Variables

MINTER_ROLE

bytes32 public constant MINTER_ROLE;
Minter role identifier

PAUSER_ROLE

bytes32 public constant PAUSER_ROLE;
Pauser role identifier

DOMAIN_SEPARATOR

bytes32 public DOMAIN_SEPARATOR;
Domain separator as described in EIP-712

PERMIT_TYPEHASH

bytes32 public constant PERMIT_TYPEHASH;
Typehash as described in EIP-712.
typehash = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)")

nonces

mapping(address => uint256) public nonces;
Transfers counter

_decimals

uint8 internal _decimals;
Asset’s decimals

Functions

initialize

function initialize(
    string name_,
    string symbol_,
    uint8 decimals_,
    address admin,
    address[] minters
) public
Constructor that initializes the most important configurations.

Parameters:

NameTypeDescription
name_stringAsset’s name.
symbol_stringAsset’s symbol.
decimals_uint8Asset’s decimals.
adminaddressAddress to set as asset’s admin.
mintersaddress[]The accounts allowed to mint new tokens.

mint

function mint(
    address _receiver,
    uint256 _amount
) external
Issues new tokens.

Parameters:

NameTypeDescription
_receiveraddressToken’s receiver.
_amountuint256Amount to be minted.

burn

function burn(
    uint256 _amount
) external
Destroys existing tokens.

Parameters:

NameTypeDescription
_amountuint256Amount to be burnt.

permit

function permit(
    address _owner,
    address _spender,
    uint256 _value,
    uint256 _deadline,
    uint8 _v,
    bytes32 _r,
    bytes32 _s
) external
Approves the spender by signature.

Parameters:

NameTypeDescription
_owneraddressToken’s owner.
_spenderaddressAccount to be approved.
_valueuint256Amount to be approved.
_deadlineuint256The permit valid until.
_vuint8Signature part.
_rbytes32Signature part.
_sbytes32Signature part.

decimals

function decimals() public returns (uint8)
Asset’s decimals

pause

function pause() public
Pauses all token transfers. The caller must have the PAUSER_ROLE.

unpause

function unpause() public
Unpauses all token transfers. The caller must have the PAUSER_ROLE.

_beforeTokenTransfer

function _beforeTokenTransfer(
    address from,
    address to,
    uint256 amount
) internal