Skip to content

This project is a dApp faucet that uses Ethers.js, React.js, Hardhat and Solidity to allow users to obtain free tokens through a smart contract on the Sepolia testnet.

License

Notifications You must be signed in to change notification settings

querylab/FaucetToken-ERC20

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FaucetToken-ERC20 🚰💰⚡

This project consists of a dApp Faucet that uses technologies such as Ethers.js and React.js to connect to a Metamask Wallet and allow users to obtain tokens for free. Hardhat and Solidity were used to develop the smart contracts, and the Sepolia Testnet was used for testing without incurring real costs. The dApp offers an intuitive interface where users can request tokens through a faucet and perform transactions by interacting with the smart contract.

Setting Up


1. Clone the repository

2. Install dependencies

$ cd FaucetToken-ERC20
$ npm install 

3. Change variables in Files

# hardhat-contracts/hardhat.config.js
$ SEPOLIA_ALCHEMY_API_KEY
$ SEPOLIA_PRIVATE_KEY
# src/ethereum/faucet.js 
$ faucetContract
# hardhat-contracts/scripts/deployFaucet.js 
$ particlestoken

4. Deployment Solidity Contract Addresses

# Deployment Contract in folder hardhat-contracts
$ npx hardhat clean
$ npx hardhat compile
$ npx hardhat run scripts/deploy.js --network sepolia

#After deploying the particlestoken.sol replace this address in hardhat-contracts/scripts/deployFaucet.js file with the variable:

const particlestoken = await Faucet.deploy("0xD20ACA19f1018D45A0c08364246d24CA0063e946");

# Once you deploy Faucet.sol replace that contract address faucet in src/ethereum/faucet.js 

$ npx hardhat run scripts/deployFaucet.js --network sepolia

# Now you need to call the token contract in your Metamask wallet to have funds from the created token. After you get tokens now you need to send some tokens to the Faucet contract so that the contract can be fund.

5. Localhost Deployment

# Run this on Parent folder FaucetToken-ERC20

$ npm start

http://localhost:3000/

About

This project is a dApp faucet that uses Ethers.js, React.js, Hardhat and Solidity to allow users to obtain free tokens through a smart contract on the Sepolia testnet.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published