Production-Ready ERC20 Smart Contract with Role-Based Access Control, Transaction Fees, Pausable Transfers, Supply Cap, and Enterprise-Grade Security Features.
Advanced Token is a production-oriented ERC20 implementation built with Solidity and OpenZeppelin.
The project demonstrates enterprise blockchain development practices including:
- Role-Based Access Control (RBAC)
- Minting Permissions
- Pausable Transfers
- Burnable Tokens
- Supply Cap Management
- Transaction Fee Mechanism
- Fee Exclusion System
- Hardhat Development Environment
- Automated Testing Support
- Gas Usage Analysis
- Coverage Reporting
This repository serves as a showcase of advanced Solidity development practices and smart contract architecture.
Fully compliant ERC20 token implementation.
Authorized accounts can mint new tokens.
Token holders can burn their tokens.
Authorized accounts can pause and resume transfers.
Supported roles:
- DEFAULT_ADMIN_ROLE
- MINTER_ROLE
- PAUSER_ROLE
Maximum supply can never exceed the predefined cap.
Supports:
- Fee Collector Wallet
- Dynamic Fee Configuration
- Fee Exclusion List
- Basis Point Fee Calculation
Built using:
- OpenZeppelin Contracts
- AccessControl
- ReentrancyGuard
- Solidity 0.8.x Overflow Protection
- Ethereum
- Polygon
- BNB Chain
- EVM Compatible Networks
- Solidity 0.8.24
- OpenZeppelin 5.x
- Hardhat
- Ethers v6
- TypeChain
- Chai
- Hardhat Network Helpers
- Solidity Coverage
/contracts AdvancedToken.sol
/scripts deploy.js
/test AdvancedToken.test.js
/typechain-types
/hardhat.config.js
/package.json
Clone repository:
git clone https://github.com/your-username/advanced-token.git
Install dependencies:
npm install
Compile contracts:
npx hardhat compile
Run tests:
npx hardhat test
Generate coverage report:
npx hardhat coverage
Run gas analysis:
REPORT_GAS=true npx hardhat test
Local Deployment:
npx hardhat run scripts/deploy.js
Sepolia Deployment:
npx hardhat run scripts/deploy.js --network sepolia
Can:
- Grant Roles
- Revoke Roles
- Configure Fees
- Configure Fee Collector
Can:
- Mint Tokens
Can:
- Pause Transfers
- Resume Transfers
Transaction fees are calculated in basis points.
Example:
100 = 1%
250 = 2.5%
1000 = 10%
Maximum fee allowed:
10%
Gaming ecosystems
Customer reward platforms
Digital asset ecosystems
Community-driven projects
Reward and utility token infrastructure
- Built on OpenZeppelin Contracts
- Uses Role-Based Access Control
- Supply Cap Protection
- Fee Protection Logic
- Reentrancy Protection
- Solidity Overflow Protection
Independent security review is recommended before mainnet deployment.
- UUPS Upgradeability
- Governance Module
- Permit (EIP-2612)
- Snapshot Voting
- Multi-Signature Administration
- DAO Integration
Parsa Abolhasani
Blockchain Developer | Smart Contract Engineer | Web3 Developer
GitHub: https://github.com/ParsaAbolhasani
LinkedIn: www.linkedin.com/in/parsa-abolhasani-rad-
MIT License