This repository contains a set of Solidity smart contracts for creating ERC20 tokens and conducting airdrops to recipients. It also includes a web3.js-based DApp to interact with the smart contracts.
https://black-sun-3682.on.fleek.co/dapp%20airdrop/
The ERC20TokenFactory contract allows users to create their own ERC20 tokens, with a specified name, symbol, and supply.
The TokenAirdrop contract can then be used to distribute those tokens to a specified list of recipients.
- Clone the repository:
$ git clone https://github.com/VladPAIN/ERC20TokenFactoryAndAirdrop.git
- Install the necessary dependencies:
$ npm install
- Compile the smart contracts:
$ truffle compile
- Deploy the contracts:
$ truffle migrate
- Run the DApp:
$ npm run dev
- Open your browser to http://localhost:3000/ to use the DApp.
- Open the DApp at http://localhost:3000/.
- Enter a name, symbol, and total supply for your new token.
- Click the "Create Token" button.
- Confirm the transaction in MetaMask.
- Open the DApp at http://localhost:3000/.
- Enter the recipients and amount of tokens to be airdropped.
- Click the "Airdrop Tokens" button.
- Confirm the transaction in MetaMask.
If you encounter any issues, please check that you have:
-
Installed all necessary dependencies (npm install)
-
Compiled the smart contracts (truffle compile)
-
Deployed the contracts (truffle migrate)
-
tarted the local development server (npm run dev)
-
Connected to the correct network in MetaMask (e.g. localhost:8545)
-
Have sufficient funds in your MetaMask account to pay for gas fees