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

Stargazers

#DANISHAHMEDKM 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.