Skip to content

Jardaliao/ERC20-demo

Repository files navigation

Contributors Forks Stargazers Issues Unlicense License LinkedIn


Logo

ERC20-demo

An ERC-20 demo token
Explore the docs »

View Demo · Report Bug · Request Feature

About The Project

Product Name Screen Shot

Built With

  • React

Getting Started

Installation

  1. Clone the repo

    git clone https://github.com/jardaliao/ERC20-demo.git
  2. Install NPM packages

    nvm use 18
    npm install
    
    cd frontend && npm install
  3. Environment variables

    cp .env.TEMPLATE .env

    Fill in the .env file. There are two variables:

    • ALCHEMY_API_KEY - a key from Alchemy
    • MNEMONIC - usually a 12 word mnemonic phrase

    Keep in mind that you need to have a wallet with some Sepolia ETH.

  4. Deploy Contracts

    npx hardhat compile
    npx hardhat run scripts/deploy.js --network sepolia

    The script will print out the contract addresses, which looks like this:0x354eceC96677fC9C10487F208D77dba7B86FC67A.

  5. Frontend environment variables

    cd frontend && cp.env.TEMPLATE .env

    Fill in the.env file. There are one variables:

    • VITE_CONTRACT_ADDRESS - the contract address
  6. Start the frontend The frontend will be available at Start the frontend

    cd frontend && npm run dev

    The frontend will be available at URL_ADDRESS:5173/

Usage

  • User whose wallet is connected to the frontend can:
    • Claim tokens by clicking the "Claim Tokens" button
    • Transfer tokens to other addresses
  • User who depoyed the contract can:
    • Transfer tokens to other addresses
    • Burn tokens
    • Set Claimable Amount & Interval

Roadmap

  • Add a new token
  • Add unit test branch/line coverage check
  • Update README
    • locally deploy & develop
  • Add Changelog
  • Proxy Contract - cheap to upgrade contracts

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Top contributors:

contrib.rocks image

(back to top)

License

Distributed under the Unlicense License. See LICENSE.txt for more information.

(back to top)

Contact

Project Link: https://github.com/jardaliao/erc20-demo

(back to top)

Acknowledgments

(back to top)