Deploy and verify contract by Foundry
Initialize the foundry directory
forge init Install an open-source solidity repo
forge install OpenZeppelin/openzeppelin-contractsOpen the directory by vs-code
code .Modify "Counter.sol"
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol";
contract TokenTest is ERC20 {
constructor() ERC20("BEVM", "BEVM") {
_mint(msg.sender, 1000 * 10 ** 18);
}
} Modify "Counter.s.sol"
Delete "test.sol"
Add a ".env" File
Activate ".env"
Deploy and verify your contract


Last updated