A comprehensive ERC20 token implementation using Foundry and built on top of OpenZeppelin's secure, community-vetted smart contracts.
DevayoToken is an ERC20 token featuring several advanced OpenZeppelin v5 extensions:
- ERC20: The standard fungible token interface.
- ERC20Burnable: Allows token holders to destroy their own tokens and approved operators to burn tokens on their behalf.
- ERC20Pausable: Allows the contract owner to pause and unpause all token transfers. Useful as an emergency stop mechanism.
- ERC20Permit: Gasless approvals via EIP-2612. Allows token holders to approve operators using a signature rather than sending an on-chain transaction.
- ERC1363: Payable token implementation (EIP-1363). Allows users to transfer or approve tokens and immediately trigger code in the recipient contract (
transferAndCall,approveAndCall), reducing the flow to a single transaction. - Ownable: Basic access control, where an account (an owner) can be granted exclusive access to specific functions (like minting and pausing).
- Token Name: DevayoToken
- Token Symbol: MTK
- Initial Supply: 1,000 MTK (with 18 decimals)
- Solidity Version:
^0.8.27
Clone the repository and install the dependencies:
git clone <your-repo-url>
cd my-token
make installCompile the smart contracts:
make buildRun the test suite to ensure everything is working as expected:
make testFor test coverage:
forge coverageConfigure your .env file first based on .env.example (if applicable), then deploy:
To a local Anvil node:
make anvil # Start Anvil in a separate terminal
make deployTo Sepolia testnet:
make deploy-sepoliaThis project is built using OpenZeppelin Contracts v5.0.2, which have been rigorously tested and audited. However, this deployment script and specific combination of extensions have not been explicitly audited. Use at your own risk.
This project is licensed under the MIT License.