Skip to content

Generate accounting CSVs for fees paid by every Juicebox project.

Notifications You must be signed in to change notification settings

filipviz/juice-fees

Repository files navigation

juice-fees

juice-fees generates accounting CSVs for fees paid by every Juicebox project, with fiat conversions in the currency of your choice.

Powered by Node.js, the Juicebox Subgraph, graph-client, and CoinGecko's v3 API.

Juicebox helps people run programmable and community funded treasuries from startup to scale, openly on Ethereum.

Installation

First, clone with:

git clone https://github.com/filipvvv/juice-fees.git
cd juice-fees

Then, create a .graphclient.yml file by copying .example.graphclient.yml:

cp .example.graphclient.yml .graphclient.yml

Optionally, you can use the free Juicebox Subgraph endpoint: replace the endpoint URL in your .graphclient.yml with https://api.studio.thegraph.com/query/30654/mainnet-dev/0.5.0. To learn more about configuring Juicebox Subgraph, read the docs.

An example configuration looks like this (be sure to replace <YOUR API KEY> with your Graph API key:

sources:
  - name: juicebox
    handler:
      graphql:
        endpoint: https://gateway.thegraph.com/api/<YOUR API KEY>/subgraphs/id/FVmuv3TndQDNd2BWARV8Y27yuKKukryKXPzvAS5E7htC
    transforms:
      - autoPagination:
          validateSchema: true

documents:
  - ./queries/*.graphql

Once your graphclient.yml is ready, run:

npm install

to install dependencies and build your queries.

Run

npm run start

Your generated CSV files will be added to the output directory.

About

Generate accounting CSVs for fees paid by every Juicebox project.

Topics

Resources

Stars

Watchers

Forks