NovaToken is a custom ERC20 token built using Solidity, OpenZeppelin, and Foundry.
This project demonstrates a clean, production-style implementation of an ERC20 token, complete with unit tests, deployment scripting, and a professional development workflow.
- Fully compliant ERC20 token
- Owner-only minting
- Self burn functionality (
msg.senderburns their own tokens) - Uses OpenZeppelin for industry-standard security
- Fully tested using Foundry
- Includes a deployment script for testnet broadcasting
- Clean, modular, beginner-friendly structure
- Solidity ^0.8.19
- Foundry (Forge, Cast, Anvil)
- OpenZeppelin Contracts
- Ethereum Testnets (Sepolia / Base Sepolia / Mantle)
Location: src/NovaToken.sol
Key functions:
mint(address to, uint256 amount)— Owner onlyburn(uint256 amount)— Token holder only- Inherits from
ERC20andOwnable(OpenZeppelin)
Constructor:
- Name:
NovaToken - Symbol:
NOVA - Decimals: 18 (ERC20 standard)
Test file: test/NovaToken.t.sol
Test coverage includes:
- Minting by owner
- Revert on mint by non-owner
- Burning tokens
- Transferring tokens
Run all tests:
forge test -vvFoundry cheatcodes used:
vm.prankvm.startPrankvm.expectRevertassertEqassertTrue
Deployment script: script/DeployNovaToken.s.sol
Deploy to testnet:
forge script script/DeployNovaToken.s.sol --rpc-url <YOUR_RPC_URL> --private-key <YOUR_PRIVATE_KEY> --broadcastThis command will broadcast a live transaction and deploy NovaToken on the selected network.
Network: Sepolia
Contract Address: 0xDd330eCB7068D207CF17AfcBAcfeC00276B93f9f
Transaction Hash: 0x6d214b0b5626f1726f51d3df40dedab086cd6f663662d271c5f4b9067adf2a18
Explorer:
https://sepolia.etherscan.io/
├── src/
│ └── NovaToken.sol
├── test/
│ └── NovaToken.t.sol
├── script/
│ └── DeployNovaToken.s.sol
├── lib/
│ └── openzeppelin-contracts/
├── foundry.toml
└── README.md
forge buildforge testforge test -vvforge fmtforge snapshotanvilcast <subcommand>- Foundry Book → https://book.getfoundry.sh/
- OpenZeppelin Contracts → https://docs.openzeppelin.com/contracts
- Solidity Documentation → https://docs.soliditylang.org/
- Sepolia Explorer → https://sepolia.etherscan.io/
NovaToken demonstrates:
- Clean ERC20 implementation
- Access-controlled minting
- Safe burn functionality
- Professional Foundry-based tests
- Automated testnet deployment
- Clean and modular repository structure
This project forms a strong foundation for advanced smart contract development such as staking, vesting, AMMs, lending pools, and options protocols.