Giter Site home page Giter Site logo

donutquests's Introduction

Donut Quests

Donut quests is an incentives platform where users get exposure to various DeFi protocols, complete tasks and earn donuts, the ERC20 token of r/ethtrader.

Generating the snapshot :

Head over to the Quest compute repo. Then run the commands explained below.

node main

Runs the snapshot scripts which fetch eligible users' data from TheGraph subgraphs. This script generates list of eligible users and saves them as taskNum.JSON. So for task with id as 0, the users list will. be generated in the JSON 0.json in the root directory.

node printRoot

This command runs the merkle root generation script. The new merkle roots for each task will be generated based on the JSONs fetched previously using node main . The merkle roots will be saved to the file roots.json. The roots will also be printed to the console.

Updating the MerkleRoots :

The merkle roots can only be updated by the owner of the contract. During testing and initial deployment, the owner is a single entity while after the testing phase, the DAO's multsig will become the owner.

To update the merkleRoot for a task, the QuestRewards contract should be called by the owner with the taskId and newMerkleRoot as parameters.

Updating the frontend :

This repository should also be updated with the new JSONs generated by the snapshots. While it isn't necessary for interacting with the contract and claiming rewards, it makes it easier for users to claim rewards as frontend will generate the merkleProof for the claim.

To update the frontend with latest JSON, just copy paste the new JSONs generated by node printRoot from questCompute repo into the claims folder inside the public folder.

donutquests's People

Contributors

0xpranay avatar huugx avatar

Watchers

 avatar  avatar

Forkers

huugx

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.