The test environment is supported by Foundry
This project is intended to implement ERC20 standard using solidity from scratch. The key function of ERC20 includes
- constructor,
- transfer,
- burn,
- mint,
- approve,
- transferFrom,
- increaseAllowance,
- decreaseAllowance,
- permit.
Also, to evaluate the correctness of my contract, I also designed a few functions to test them.
├── Counter.sol
├── MaliciousSpender.sol
├── HomeworkERC20.sol
├── ReentrancyAttacker.sol
test/
├── Counter.t.sol
├── HomeworkERC20.t.sol
Install dependencies:
forge install
forge test -vvv- Foundry
- OpenZeppelin Contracts