Git Product home page Git Product logo

faucet's Introduction

Khalani Tokens Faucet

Khalani Protocol connects multiple chains, and on each chain there are USD-like ERC-20 test tokens deployed.

This project provides a user-friendly faucet forked from Avalanche Faucet to allow users and external developers get some test tokens:

  • Khalani Chain native token KHA
  • Sepolia (USDC / USDT)
  • Avalanche Fuji (USDC / USDT)
  • Polygon Mumbai (USDC / USDT)
  • BSC Testnet (USDC / USDT / BUSD)
  • Arbitrum Goerli (USDC / USDT)
  • Optimism Goerli (USDC / USDT)
  • Godwoken (USDC / USDT)

faucet.png

Original fork changes

Compared to the original fork, this repository has several patches and improvement:

  • significantly streamlined the state management of requests and nonce/balance recalibration
  • added support of faucet wallet signer with AWS KMS
  • added Prometheus support
  • allow to configure faucet from a file specified by CONFIG_FILE
  • allow to override RPC URLs with ENV variables of name EVM_CHAINS_${CHAIN_ID}_RPC specified in evmchains of config.json, for example EVM_CHAINS_KHALANITESTNET_RPC — allows to move RPC URLs to mountable Kubernetes Secrets.
  • allow to disable captcha verification — needed to test the deployment and then register Google Captcha for the production domain
  • added Khalani Protocol branding (logo / docs)

Prometheus metrics

Faucet exposes some useful Prometheus metrics on /metrics:

  • faucet_wallet_balance { chain, token_id, token_name, token_address, faucet_address } — current balance of the faucet wallet: amount of ERC20 (token_name/token_address) or native tokens (token_name/token_address = "native")
  • faucet_wallet_nonce { chain } — nonce number of the faucet wallet used to order transactions
  • faucet_requests_processed { chain, status } — Number of processed faucet requests

AWS KMS signer

KMS keys are configured with AWS_KMS_KEY_${CHAIN_ID} env variables. Global AWS region is configured with AWS_REGION env variable.

Faucet process must be authenticated to call KMS API and be authorized to use the specified KMS keys.

The recommend way of authorization is to use Web Identity IAM roles.

Development

First, prepare an .env file. Copy .env.dist to .env and set up the wallet key.

Run npm install then npm run dev.

faucet's People

Contributors

rajranjan0608 avatar serejke avatar adutchak avatar truemiller avatar connorch avatar konraddb avatar kanatliemre avatar kemal-arbeiter avatar patrick-ogrady avatar khaihkd avatar bafu avatar itinance avatar nahoc avatar roinevirta avatar mculinovic avatar dependabot[bot] avatar xyrus02 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.