Code Monkey home page Code Monkey logo

faucet's Introduction

faucet

Faucet cloudflare worker for prefunding bounty hunters' addresses

How it works

  1. Some 3rd party service (for example ubiquity bot) sends a POST request with the address query param, for example: https://ubq-faucet.workers.dev/?address=0x01
  2. Openzeppelin Defender Relay service prefunds the 0x01 address with some gas payment tokens (XDAI, ETH, etc...) if the following conditions are met:
    • wallet address exists in the ubiquity bot's DB (i.e. the wallet is registered by some bounty hunter)
    • this is the 1st issue solved by a bounty hunter (i.e. the registered wallet address hasn't got any permits)
    • wallet address has 0 gas tokens amount

How to run locally

  1. Setup env variables in the .dev.vars file:
# Environment variables used for development build on `yarn start`

# openzeppelin defender relay API key
RELAY_KEY=
# openzeppeling defender relay secret
RELAY_SECRET=

# supabase DB URL
SUPABASE_URL=
# supabase DB secret key
SUPABASE_KEY=

# fund amount in wei
CLAIM_FEE=
  1. Run yarn start to start a local cloudflare worker instance

faucet's People

Contributors

rndquu avatar keyrxng 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.