Create an ERC20 token
In this tutorial you'll build and deploy an ERC20 token to Validium Testnet
Prerequisites
Custom ERC20 token code
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.19;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
contract TestToken is ERC20, Ownable, ERC20Burnable {
constructor(string memory name, string memory symbol) ERC20(name, symbol) {
_mint(msg.sender, 100 * 10 ** decimals());
}
function mint(address to, uint256 amount) public onlyOwner {
_mint(to, amount);
}
}Deploy and interact with the contract
Deploy the smart contract

Interact with the ERC20 contract


Takeaways
Next steps
Last updated