Code Monkey home page Code Monkey logo

faucet's Introduction

Welcome to Alfajores Faucet app

This Repo contains the code for the alfajores faucet. This is contained in 2 apps.

  • The firebase app contains functions which do the actual fauceting.

  • The web app contains a UI for making requests.

The web app deploys automatically to vercel.

Setup

Wep app

To set up the web app to run locally:

  1. navigate to the apps/web folder

    $ cd apps/web
  2. link your local repository to the faucet project on Vercel

    $ yarn dlx vercel@latest link

    You'll be asked to authenticate with your Vercel account. Once you've done that, you'll be guided through a series of prompts to link your local project to the faucet Vercel project.

    ? Set up “~/Documents/celo-org/faucet/apps/web”? [Y/n] y
    ? Which scope should contain your project? Celo Ecosystem Project Hosting
    ? Link to existing project? [y/N] y
    ? What’s the name of your existing project? faucet
    ✅  Linked to c-labs/faucet (created .vercel)
    
  3. fetch environment variables from Vercel

    $ yarn dlx vercel@latest env pull

    If you get an error like Error! No project found, you may need to run vercel link again. If everything worked, you should see a message like this:

    > Downloading `development` Environment Variables for Project faucet
    ✅  Created .env.local file  [249ms]
  4. run the app locally

    $ yarn dev

    You should see a message like this:

    ready - started server on 0.0.0.0:3000, url: http://localhost:3000
    info  - Loaded env from /Users/arthur/Documents/celo-org/faucet/apps/web/.env.local

    You can now view the app in your browser at http://localhost:3000.

Firebase app

To set up the firebase app to run locally:

  1. navigate to the apps/firebase folder
    $ cd apps/firebase
  2. login to firebase
    $ yarn dlx firebase-tools@latest login
    You'll be asked to authenticate with your Firebase account.
  3. build the firebase app
    $ yarn run preserve
  4. ensure that you are on required node version specified in engines.node in firebase/package.json. Currently this is Node 20 at the time of writing.
    $ nvm use <the-required-node-version>
  5. run the firebase app locally
    $ yarn run serve

Adding chains

Web

  • Add the chain config and token info to config/chains.ts.

  • Add chain name to the networks array, and ChainId and FaucetAddress to enums in types/index.ts.

Firebase

In the apps/firebase project run yarn cli config:set with the relevant params.

faucet's People

Contributors

aaronmgdr avatar alecps avatar annakaz avatar ashishb avatar aslawson avatar bowd avatar carterqw2 avatar cmcewen avatar codyborn avatar critesjosh avatar dckesler avatar eelanagaraj avatar etuleu avatar gastonponti avatar gnardini avatar i1skn avatar jcortejoso avatar jeanregisser avatar jmrossy avatar m-chrzan avatar martinvol avatar medhakothari avatar mrsmkl avatar nambrot avatar pedro-clabs avatar pedro-vk avatar tarikbellamine avatar timmoreton avatar tkporter avatar yorhodes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

faucet's Issues

GitHub Authentication

Investigate adding a GitHub authentication step to increase funds sent to authenticated requests

Update GitHub setup files

Check all below:

Tasks

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid schedule: Invalid schedule: Failed to parse "every other thursday"

Fix node version warning

It looks like firebase project might require node 20 while web is on node 18?

Should move to node 20?

Reduce amount fauceted

Even Free Tokens are Not Free. There is a limit to how much is available to be fauceted. Its just as easy to test with 1 token as 5 since there are divisible

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm vm2 Unavailable

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • fix(deps): update dependency bignumber.js to ^9.1.2
  • fix(deps): update dependency debug to ^4.3.5
  • fix(deps): update dependency next-auth to ^4.24.7
  • chore(deps): update dependency node to v20.15.1
  • chore(deps): update yarn to v4.3.1
  • fix(deps): update dependency @celo/connect to v5.3.0
  • fix(deps): update dependency @google-cloud/logging to ^11.1.0
  • fix(deps): update dependency @mento-protocol/mento-sdk to ^0.2.8
  • fix(deps): update dependency next to v14.2.5
  • fix(deps): update react monorepo to v18.3.1 (react, react-dom)
  • fix(deps): update celo (major) (@celo/contractkit, @celo/utils)
  • fix(deps): update dependency @mento-protocol/mento-sdk to v1
  • fix(deps): update dependency firebase-functions to v5
  • 🔐 Create all rate-limited PRs at once 🔐

Pending Status Checks

These updates await pending status checks. To force their creation now, click the checkbox below.

  • chore(deps): update dependency @types/node to v20.14.11

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/ci.yaml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/checkout v4
  • actions/setup-node v4
npm
apps/firebase/package.json
  • @celo/connect 5.1.1
  • @celo/contractkit 6.0.0
  • @celo/utils 5.0.6
  • @firebase/app ^0.9.6
  • @google-cloud/logging ^11.0.0
  • @mento-protocol/mento-sdk ^0.1.4
  • bignumber.js ^9.1.1
  • debug ^4.3.4
  • firebase ^10.7.0
  • firebase-admin ^12.0.0
  • firebase-functions ^4.6.0
  • firebase-tools ^13.0.2
  • @types/debug ^4.1.12
  • @types/node ^20.14.10
  • @types/yargs ^17.0.32
  • cross-env 7.0.3
  • firebase-bolt ^0.8.4
  • ts-node ^10.9.2
  • typescript ^5.5.3
  • yargs 17.7.2
  • node 20
apps/web/package.json
  • @firebase/app-types ^0.9.0
  • @metamask/detect-provider ^2.0.0
  • @vercel/analytics ^1.0.0
  • firebase ^10.7.0
  • next 14.1.1
  • next-auth ^4.20.1
  • react 18.2.0
  • react-dom 18.2.0
  • react-google-recaptcha-v3 ^1.10.1
  • react-use-async-callback ^2.1.2
  • @types/node 20.14.10
  • @types/react 18.3.3
  • @types/react-dom 18.3.0
  • typescript 5.5.3
  • node 20
package.json
  • husky ^8.0.3
  • prettier ^3.3.3
  • node 20
  • vm2 ^3.9.17
  • yarn 4.0.2
nvm
.nvmrc
  • node 20

  • Check this box to trigger a request for Renovate to run again on this repository

Define and implement faucet support levels

The faucet is an important service to the developer community. We want to make sure it works well, for that reason some monitoring might be useful.

The objective here is to investigate whether faucet alerts are necessary (might not be useful if they are not actionable).
We want to keep on-call manageable so avoiding unnecessary alerts is important.

Consider limiting faucet requests to `CELO` tokens (no `cStables` or other 3rd-party tokens)

Describe the feature you would like

Context: Faucet for testnet Mento stables

Tasks

Additional context

No response

Reduce amount of cUSD that can be claimed to 0.1 cUSD

Describe the feature you would like

Currently, the amount of cUSD that can be claimed is high considering the very low gas fees on CELO. Especially with the focus on MiniPay the faucet gets drained very fast.

Reduce the amount to 0.1 cUSD

Additional context

No response

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.