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.
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.
npm run start
Your generated CSV files will be added to the output
directory.