With Foundry
Prerequisites
1. Set up the project
forge init my-projectforge install OpenZeppelin/openzeppelin-contracts2. Write the ERC20 token contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol";
contract MyERC20 is ERC20 {
constructor() ERC20("MyToken", "MTK") {}
}3. Build the contract
4. Deploy the ERC20 token contract
5. Verify the contract
6. Exploring and interacting with your deployed contract
Last updated