ERC-20 Token Standards, Extensions and utils

Deployment of ERC-20 token can be done through Remix IDE or locally using Truffle. Since eRon blockchain supports EVM and Web3, it is compatible with Ethereum development toolsets. Remix is the easiest way to deploy the ERC-20 smart contract onto the eRon blockchain.

To deploy an ERC-20 token using Remix IDE, navigate to the Remix page. In the deploy section, choose Injected Web3 and ensure that your MetaMask is connected to the eRon blockchain. To connect to the eRon blockchain, visit the eRon blockchain's staking page, which will automatically create a new MetaMask network for you. Alternatively, you can configure your MetaMask manually.

                          
                            
                            // SPDX-License-Identifier: GPL-3.0
                            
                            
                              pragma solidity ^0.8.1;
                            
                            
                              import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
                            
                            
                                contract MyERC20Token is ERC20 {
                            
                            
                                    constructor() ERC20("My Test Token", "MTT") {
                            
                            
                                        _mint(msg.sender, 1000 ether);
                            
                            
                                    }
                            
                            
                                }
                            
                          
                        

There are a few core contracts that implement the behavior specified in the ERC20 token standard:

{IERC20}: the interface all ERC-20 implementations should conform to.

{IERC20Metadata}: the extended ERC-20 interface including the name, symbol and decimals functions.

{ERC20}: the implementation of the ERC-20 interface, including the name, symbol and decimals optional standard extension to the base interface.

Additionally there are multiple custom extensions, including:

{ERC20Permit}: gasless approval of tokens (standardized as ERC-2612).

{ERC20Burnable}: destruction of own tokens.

{ERC20Capped}: enforcement of a cap to the total supply when minting tokens.

{ERC20Pausable}: ability to pause token transfers.

{ERC20FlashMint}: token level support for flash loans through the minting and burning of ephemeral tokens (standardized as ERC-3156).

{ERC20Votes}: support for voting and vote delegation.

{ERC20Wrapper}: wrapper to create an ERC-20 backed by another ERC-20, with deposit and withdraw methods. Useful in conjunction with {ERC20Votes}.

{ERC1363}: support for calling the target of a transfer or approval, enabling code execution on the receiver within a single transaction.

{ERC4626}: tokenized vault that manages shares (represented as ERC-20) that are backed by assets (another ERC-20).

Finally, there are some utilities to interact with ERC-20 contracts in various ways:

{SafeERC20}: a wrapper around the interface that eliminates the need to handle boolean return values.

Other utilities that support ERC-20 assets can be found in codebase:

ERC-20 tokens can be timelocked (held tokens for a beneficiary until a specified time) or vested (released following a given schedule) using a {VestingWallet}.