GitHub: ERC20Registry

Overview

The ERC20Registry contract provides modifiers for registering ERC20 tokens and their associated stores. The registration is done to allow the token to be recognized and interoperable with other parts of the MiniEVM rollup functionality.

Modifiers

register_erc20

Registers an ERC20 token with the ERC20 registry. This is done to allow the token to be recognized and interoperable with other parts of the MiniEVM rollup.

modifier register_erc20() {
    ERC20_REGISTRY_CONTRACT.register_erc20();
    _;
}

register_erc20_store

Registers an ERC20 store for a given account with the ERC20 registry if it is not already registered. This is done to keep track of which accounts are associated with which ERC20 tokens.

modifier register_erc20_store(address account) {
    if (!ERC20_REGISTRY_CONTRACT.is_erc20_store_registered(account)) {
        ERC20_REGISTRY_CONTRACT.register_erc20_store(account);
    }
    _;
}

Parameters

NameTypeDescription
accountaddressThe address of the ERC20 store to check and register if not already registered