Giter VIP home page Giter VIP logo

allowlist-paymaster-dapp's Introduction

Celo

Allowlist Paymaster using ThirdWeb SDK

This is the implementation of Allowlist Paymaster, a paymaster that allows a list of UserOperation senders to be sponsored by the paymaster

Table of Contents

Installation

Clone the repo

git clone https://github.com/celo-academy/allowlist-paymaster-dapp.git

Install dependencies

yarn install

Usage

Step 1: Deploy the AllowlistPaymaster

.env setup in packages/hardhat

  • Go to packages/hardhat folder
  • Create a .env file and copy the contents of .env.example into it
  • Get the Private Key of the owner of the Paymaster and place it in the .env file
  • Open the file scripts/deploy.js, Entrypoint are frequently upgraded make sure the variable ENTRYPOINT_ADDRESS has the correct value
  • Run the deploy script to deploy the paymaster using the following command
npx hardhat run scripts/deploy.js --network alfajores

Step 2: Start the App

.env setup in packages/react-app

  • Copy the paymaster address that you get in the terminal, this is the value for ALLOWLIST_PAYMASTER_ADDRESS in packages/react-app/paymaster/index.js
  • Create a .env file in packages/react-app and copy the contents of .env.example in packages/react-app into it
  • Get NEXT_PUBLIC_THIRDWEB_API_KEY from the ThirdWeb Dashboard
  • Place the key in .env file in packages/react-app
  • Get NEXT_PUBLIC_WC_PROJECT_ID from WalletConnect dashboard
  • PAYMASTER_SIGNER_KEY is the same as the private key of the owner that you put in .env in packages/hardhat

To run the app

yarn dev

Optional:

You can verify the paymaster by using your Celoscan key in .env in packages/hardhat folder and use the following command

npx hardhat verify [PAYMASTER_ADDRESS] [ENTRYPOINT_ADDRESS] [PAYMASTER_OWNER_ADDRESS] --network alfajores

Features

  • Customize the allowList in index.js in packages/react-app/paymaster to allow sponsorship of smart accounts by the paymaster

Doubts

Join Office Hours in Celo discord

allowlist-paymaster-dapp's People

Contributors

therealharpaljadeja avatar

Stargazers

 avatar

Watchers

Joe Nyzio 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.