ERC20 Airdop with Merkle Trees | Hardhat | Wagmi V2 | Viem V2 | RainbowKit V2 | Typescript | NextJS | ChakraUI
This project implements a standard ERC20 token with an additional whitelisting feature based on a Merkle tree for initial token distribution.
- ERC20 Standard: Implements all standard functionalities of an ERC20 token.
- Whitelist: Allows only whitelisted addresses to mint tokens, using a Merkle proof mechanism.
- One-time Mint: Whitelisted users can mint tokens only once.
- Solidity ^0.8.24
- Hardhat
- OpenZeppelin Contracts
- @openzeppelin/merkle-tree
- Chai for testing
To get started with this project, follow the steps below:
git clone repository_url
yarn install
yarn hardhat compile
To run the tests:
yarn hardhat test
This will execute all tests defined in the test/ folder.
To deploy this contract to a network (e.g., Sepolia testnet), configure your hardhat.config.js with network information and run:
npx hardhat run scripts/deploy.js --network sepolia
Make sure to replace "sepolia" with the name of your chosen network configured in hardhat.config.js.
Contributions are welcome!
Distributed under the MIT License. See LICENSE for more information.