GenericUnitL2
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);| Name | Type | Description |
|---|---|---|
coordinator | address | Address to be set as the owner |
name | string | ERC20 token name |
symbol | string | ERC20 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);| Name | Type | Description |
|---|---|---|
interfaceId | bytes4 | The interface identifier to check |
| Name | Type | Description |
|---|---|---|
<none> | bool | True if the interface is supported, false otherwise |