ShowenPeng / ERC20TokenFaucet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome to ERC20 Token Faucet πŸ‘‹

Version Documentation Maintenance License: MIT

🏠 Hosted on: https://www.erc20tokenfaucet.com/


A useful ERC20 token faucet for testing ERC20 smart contract functions!
Actually, you can mint TSUSD Token only in Goerli Testnet.

How do you mint a TSUSD Token?
Easy, go to ERC20 Token Faucet Homepage at this link. Then connect your Metamask wallet and click on button 'MINT TOKEN', confirm the transaction, wait the confirmation about network and enjoy with a one unit of TSUSD Token!

How can you see your TSUSD Token balance?
Simple, go to ERC20 Token Faucet Homepage at this link. Then connect your Metamask wallet and click on button 'SEE MY BALANCE' and you can see your TSUSD Token Balance with other important information!

Demo

gif demo ERC20TokenFaucet application

Deployed Token Addresses


Symbol Decimals Network Address Active
TSUSD 18 Goerli 0x10cEe1c84Df52ceb04d48E6F321d9A7a40Ac3a63 🟒
TSUSD 18 Sepolia Upcoming... πŸ”΄

Testnet Ether Faucets


Network Explorers Testnet ETH Faucets
Goerli https://goerli.etherscan.io https://goerlifaucet.com/
https://goerli-faucet.slock.it/
Sepolia https://sepolia.etherscan.io https://faucet.sepolia.dev/
https://faucet-sepolia.rockx.com//

Usage

ERC20TokenFaucet uses the following depedencies:

  • Ethers;
  • Browserify;
  • Tailwind.
In the project, Ethers is used for interacting with Web3 provider and handling the operations related to TSUSD Token smart contract like:
  • retrieve ERC20 token name;
  • retrieve balanceOf about signer;
  • transfer a unit of TSUSD Token to the sender of transaction.

ERC20TokenProject uses different classes for handling the request given in, input from the user (such as: checking the user balance related to TSUSD Token). For this scope, the other package used in the project is Browserify. This library, allows use Node. js-style modules that compile for use in the browser. This tool generates a file, which contract all the project modules, called bundle.js present in the folder called dist.

to contract all the files (in this case Javascript) into a single file called Tips: Each time, you modify a single (or multiple) file into scripts folder you must to run into terminal this command for building the new bundle.js file with your changes:

npx browserify ./scripts/[nameFile].js --standalone bundle -o dist/bundle.js

Example:

npx browserify ./scripts/index.js --standalone bundle -o dist/bundle.js

This project also uses a CSS framework called Tailwind, it allows you to build a responsive site in a fast way. For any changes that you'll make to front-end, remember to run tailwind before with this command:

npx tailwindcss -i ./css/styles.css -o ./dist/output.css --watch

And then you can start to modify the website design.

Test

In this project, the test is divided into:

  • End-to-End test;
  • Smart Contract test.

The first type allows to test the front-end of application. In detail, using cypress are tested all the behaviors that application should execute in specific conditions.
You can view the tests inside the following path: {rootProjectFolder}/tests/integration. For the second type the test-development environment called Hardhat. With this tool, it tested the smart contract for minting a unit of TSUSD Token.
You can view the tests inside the following path: {rootProjectFolder}/tests/smartcontract.

For running the test that I described above in your terminal, you can digit one of following commands:

  • End-to-End Test:
  • npm run cypress-test 
  • Smart Contract Test:
  • npm run hardhat-test 

Author

πŸ‘€ Kerry

🀝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

πŸ“ License

Copyright Β© 2022 Kerry.
This project is MIT licensed.

About

License:MIT License


Languages

Language:JavaScript 74.3%Language:HTML 17.7%Language:Solidity 6.3%Language:CSS 1.7%