Giter Club home page Giter Club logo

fweb3_holder_matic_faucet's Introduction

MATIC Faucet for FWEB3 Holders

A MATIC faucet for the FWEB3 Community

This is a Smart Contract deployed onto the Polygon Network (Contract Address TBD). Users will be able to request tokens from this contract in order to be able to send transactions on the Polygon Network.

Usage

FWEB3 holders will be able to call the 'faucet' function with their address in order to receive a pre-determined amount of MATIC.

After they call the 'faucet' function, they will not be able to use the faucet again for a pre-determined amount of time.

After the time has elapsed, they can call 'faucet' again to receive a pre-determined amount of MATIC.

Must hold a pre-determined amount of FWEB3 to be able to use the faucet function.

Possible Variables

  • Increment of MATIC to Send: .1 MATIC
  • Timeout for the Faucet: 24 Hours (or equivalent blocks)
  • Amount of FWEB3 to use the Faucet: 300 FWEB3

Token Development

What should the contract be able to do?

  • When sent money, the native token of the network will be made part of the faucet
  • When someone asks for money, the faucet needs to check the address of the account to make sure they haven't received tokens in the last 24 Hours AND that they are a FWEB3 token holder.
  • After that, they will then be sent a pre-determined amount of MATIC and a new timestamp will be added to hash to notify when they are allowed to receive again
  • If the faucet is empty, it returns an error
  • If the users has received tokens recently, it returns an error

Front End React

  • node v16
  • React 17

Set ENV vars

  • REACT_APP_FAUCET_ACCOUNT_PRIVATE_KEY - get this from MetaMask
  • REACT_APP_FAUCET_CONTRACT_ADDRESS - The address on Polygon Network is 0x67806adca0fD8825DA9cddc69b9bA8837A64874b
# use node v16
nvm use
# install deps
yarn install
# run dev server
yarn start
# build prod
yarn build

Front End Notes / Tooling:

Use yarn for preformance optimizations over npm

Use nvm for managing node version


Future To Do Items

  • Get a Github Actions Pipeline Setup
  • Support Environment Variables to Switch Out Contracts in Dev, Test and Prod

fweb3_holder_matic_faucet's People

Contributors

archae0pteryx avatar bschuster3434 avatar slinlee avatar zan-rosenthal avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.