This is the official subgraph for the Vault V2 - Yearn Protocol.
The subgraph is being updated and fixed constantly.
To get started, you need to install the dependencies:
- Using Yarn:
yarn install
- Using NPM:
npm install
To run tests;
- Make sure your installed version of graph is newer than 0.22.0 using
graph --version
- If you don't have Postgres installed, install it; https://github.com/LimeChain/matchstick#quick-start-
- Run
yarn prepare:mainnet
oryarn prepare:fantom
to preparesubgraph.yaml
. - Run
yarn test
. Graph CLI should download and install a binary for the testing framework, Matchstick. Once the testing framework is set up, the tests will be run. If this does not work, you may need to compile Matchstick locally and run tests using$matchstick_build_dir/matchstick
instead.
Once the smart contracts are deployed on a testnet or mainnet, the JSON files located at folder config
must be updated.
The final subgraph.yaml file is used to deploy on the network.
Each network has a JSON file in the ./config
folder. When a deploy process is executed (using a script defined in the package.json
), it creates the final subgraph.yaml, and deploy it to the The Graph node.
At this moment, the scripts available are:
- yarn deploy:fantom: build the subgraph.yaml file, and deploy it on the Fantom network.
- yarn deploy:mainnet: build the subgraph.yaml file, and deploy it on the mainnet Ethereum network.
- yarn deploy:arbitrum: build the subgraph.yaml file, and deploy it on the Arbitrum network.
We don't support Ethereum testnets at the moment.
We currently have a multitude of needs across all of our yTeams. As the Yearn ecosystem and suite of products continue to grow, we look for new contributors to join our community as we rapidly scale.
If you are interested in working as a yearn contributor, complete this form, and a member of our operations team will reach out within 1-2 days with the next steps.
For additional information on the onboarding process, click here
Feel free to assign an issue from our current list and create a pull request. We will review it in the next 1-2 days to give you feedback about your changes.
If you want to help Yearn Finance but you need more information about this repository, schema and entities, you can read this onboarding doc.
The official subgraph links are: