ERC-20 smart contract
Customise and use the ERC-20 smart contract to create a token
Create your own token
As a best practice, you can choose to create your own token using the ERC-20 standard template.
Use the following smart contract in the code editor of your choice, customise your cryptocurrency, and compile your code after approving the connection using your preferred digital wallet (here, MetaMask Wallet is used).
ERC-20 smart contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/[email protected]/token/ERC20/ERC20.sol";
contract InterchainToken is ERC20 {
constructor() ERC20("TestToken", "TST") {
// Mint 77000000 tokens to the creator
_mint(msg.sender, 77000000 * 10 ** 18);
}
}
Last updated
Was this helpful?