Skip to content

Repository files navigation

🚀 Ivan Token (IVN) - ERC20 Implementation

Solidity

Framework

License

Coverage

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.


🏗 Project Architecture

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).


🛠 Tech Stack & Tools


✨ Features

  • Standard Compliance: Fully compatible with the ERC20 standard.

  • Ownable & Secure: Implements OpenZeppelin's Ownable for administrative functions (minting).

  • Advanced Testing: Utilizes modern Foundry cheatcodes like vm.prank and vm.expectRevert.

  • Gas Optimized: Compiled with the via-ir pipeline and cancun EVM version for compatibility and efficiency.


🚀 Live Deployment (Amoy Testnet)

The contract is successfully deployed and live on the Polygon Amoy Testnet.


🧪 Testing

This project maintains 100% code coverage. We use strictly Solidity-based testing to ensure contract reliability.

Key Tests:

  1. Initial Supply Check: Verifies correct minting on deployment.
  2. Secure Transfers: Ensures users can send/receive tokens.
  3. Access Control: Validates that only the Owner can mint new tokens.

Run Tests:

forge  test  -vv

Coverage Report:

forge coverage

coverage


Installation & Usage

Prerequisites

  • Foundry
curl -L https://foundry.paradigm.xyz | bash && foundryup

Clone & Build

git  clone <your-repo-url>

cd  ERC20-Ivan-Token

forge  install

forge  build

📜 Deployment Script

The 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 --verify

📜 License

This project is licensed under the MIT License.

Author

Ali Nasirlou

Github : alinasirlou2020 Linkedin : Ali Nasirlou

About

A ERC20 token that made by Foundry framework

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages