Skip to content

vesperfi/onsen-rewards-snapshot

Repository files navigation

Onsen rewards snapshot

Generate snapshot for distributing Vesper rewards to staker of VSP-ETH LP token in Sushi Onsen.

Setup

  1. Install
npm i
  1. Set required environment variables using export or .env
export NODE_URL="eth_mainnet_url"
export MNEMONIC="mnemonic"

Check and update (if required) default values in .env.defaults

  1. Calculate onsen rewards data file using command line args.

Command Syntax

node index.js -s <rewardsStartBlock> -e <rewardsEndBlock>

Raise Pull request to verify generated data file. Once PR is verified, approved and merged, call create-claim operation.

  1. Create claim using generated data file.

Command Syntax

node create-claim.js -f <datasetUrl>

Create claim using fork for local testing.

  1. Create fork
npm run fork
  1. Run below command on another terminal to create a claim. The swap-eth-to-erc20.js will swap some VSP to first account of configured mnemonic.
export NODE_URL="http://localhost:8545"
node test/swap-eth-to-erc20.js
node create-claim.js -f <datasetUrl>
  1. Clone pure.finance repo and run below command on another terminal. Open http://localhost:3000/merkle-claims and Merkle Claims for generated claim id.
npm install
npx lerna run --stream dev

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •