0.2.0 • Published 3 years ago

snapborg v0.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Snapshot Governance

Scrapes snapshot to pin the IPFS files to your own node.

Quickstart

you can ignore the Makefile and Dockerfile no reason to use them

  1. Install via npm/yarn, startup your local IPFS daemon

Note there is a script check-ipfs.sh if you are unsure if your IPFS daemon is working!

  1. configure the run.sh with your parameters, the default is setup to Yearn Finance's snapshot (ychad.eth)

  2. Run the command

./run.sh
  1. Examine the directory data/

How to Run

Copy and rename .env.example to .env and replace the variables with their corresponding values.

cp .env.example .env

Scrape Snapshot API and sync files to IPFS

make scrape

How it works

  • scrape.ts hits snapshots API to get all the proposals
  • It writes the file proposals.txt to use for ipfs-sync
  • It then gets all the votes from the proposals from snapshots api
  • It writes the file votes.txt
  • It then runs ipfs-sync on these four files
  • All the scripts are de-dupped so that this could run on a VM in the cloud, ping it once a day, and it will only append to the txt files. Then ipfs-sync already skips over dupes.