Skip to content

GenericUnitL2

Git Source

Inherits: ERC20Mintable

A Layer 2 mirror of the GenericUnit token with minting capabilities and interface support detection

This contract extends ERC20Mintable to provide a mintable ERC20 token that serves as a mirror of the GenericUnit token deployed on other chains. It includes interface support checking for IERC165 and IERC20 standards. The coordinator address receives mint/burn privileges upon deployment.

Functions

constructor

Initializes the GenericUnit L2 token with metadata and sets the owner.

The owner address gets mint/burn privileges.

constructor(
    address coordinator,
    string memory name,
    string memory symbol
)
    ERC20Mintable(coordinator, name, symbol);
Parameters
NameTypeDescription
coordinatoraddressAddress to be set as the owner
namestringERC20 token name
symbolstringERC20 token symbol

supportsInterface

Checks if the contract supports a specific interface.

Returns true for IERC165 and IERC20 interfaces.

function supportsInterface(bytes4 interfaceId) external pure returns (bool);
Parameters
NameTypeDescription
interfaceIdbytes4The interface identifier to check
Returns
NameTypeDescription
<none>boolTrue if the interface is supported, false otherwise