Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ERC20Bridgeable

Inherits: ERC20, ERC165, IERC7802

ERC20 extension that implements the standard token interface according to https://eips.ethereum.org/EIPS/eip-7802[ERC-7802].

Functions

onlyTokenBridge

Modifier to restrict access to the token bridge.

modifier onlyTokenBridge();

supportsInterface

function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool);

crosschainMint

See {IERC7802-crosschainMint}. Emits a {IERC7802-CrosschainMint} event.

function crosschainMint(address to, uint256 value) public virtual override onlyTokenBridge;

crosschainBurn

See {IERC7802-crosschainBurn}. Emits a {IERC7802-CrosschainBurn} event.

function crosschainBurn(address from, uint256 value) public virtual override onlyTokenBridge;

_checkTokenBridge

Checks if the caller is a trusted token bridge. MUST revert otherwise. Developers should implement this function using an access control mechanism that allows customizing the list of allowed senders. Consider using {AccessControl} or {AccessManaged}.

function _checkTokenBridge(address caller) internal virtual;