Skip to main content

Solidity API

ERC20Executable

_balances

mapping(uint8 => mapping(address => uint256)) _balances

_totalSupply

uint256 _totalSupply

constructor

constructor(address bridgeAddress) internal

rollup

function rollup(uint8 targetDomainID, bytes32 resourceID, uint64 batchSize) external virtual

Executes rollup.

Requirements:

  • It must be called by only rollup admin.

totalSupply

function totalSupply() public view virtual returns (uint256)

See {IERC20-totalSupply}.

balanceOf

function balanceOf(address account) public view virtual returns (uint256)

See {IERC20-balanceOf}.

_transfer

function _transfer(address from, address to, uint256 amount) internal virtual

Moves amount of tokens from from to to.

This internal function is equivalent to {transfer}, and can be used to e.g. implement automatic token fees, slashing mechanisms, etc.

Requirements:

  • from cannot be the zero address.
  • to cannot be the zero address.
  • from must have a balance of at least amount.

Emits a {Transfer} event.

_mint

function _mint(address account, uint256 amount) internal virtual

Creates amount tokens and assigns them to account, increasing the total supply.

Requirements:

  • account cannot be the zero address.

Emits a {Transfer} event with from set to the zero address.

_burn

function _burn(address account, uint256 amount) internal virtual

Destroys amount tokens from account, reducing the total supply.

Requirements:

  • account cannot be the zero address.
  • account must have at least amount tokens.

Emits a {Transfer} event with to set to the zero address.