A professional, production-ready ERC20 token implementation using the Foundry development framework and OpenZeppelin standards. This project serves as a showcase of smart contract best practices, including comprehensive testing, gas optimization, and automated deployment scripts.
The project is structured following the Foundry standard layout for maximum efficiency and readability:
-
src/: Core smart contract logic. -
test/: Unit tests written in Solidity for robust verification. -
script/: Deployment and interaction scripts. -
lib/: External dependencies (OpenZeppelin).
- Solidity: ^0.8.20
- Framework: Foundry (Forge & Cast)
- Library: OpenZeppelin Contracts
- Infrastructure: QuickNode RPC
-
Standard Compliance: Fully compatible with the ERC20 standard.
-
Ownable & Secure: Implements OpenZeppelin's
Ownablefor administrative functions (minting). -
Advanced Testing: Utilizes modern Foundry cheatcodes like
vm.prankandvm.expectRevert. -
Gas Optimized: Compiled with the
via-irpipeline andcancunEVM version for compatibility and efficiency.
The contract is successfully deployed and live on the Polygon Amoy Testnet.
-
Contract Address:
0x0Fc2C3f40f27d27953669a98035156227384Bc6C -
Network: Polygon Amoy (Chain ID: 80002)
-
Symbol: IVN
-
Initial Supply: 1,000,000 IVN
-
Verified Contract: Click here to view on PolygonScan ✅
This project maintains 100% code coverage. We use strictly Solidity-based testing to ensure contract reliability.
- Initial Supply Check: Verifies correct minting on deployment.
- Secure Transfers: Ensures users can send/receive tokens.
- Access Control: Validates that only the
Ownercan mint new tokens.
forge test -vvforge coverage- Foundry
curl -L https://foundry.paradigm.xyz | bash && foundryupgit clone <your-repo-url>
cd ERC20-Ivan-Token
forge install
forge buildThe deployment is handled via Solidity scripts for idempotency and security.
script script/DeployIvan.s.sol --rpc-url $AMOY_RPC_URL --private-key $PRIVATE_KEY --broadcast --verifyThis project is licensed under the MIT License.
Github : alinasirlou2020
Linkedin : Ali Nasirlou
