The code of Elyfi subgraph. You can test mainnet subgraph here
yarn global add @graphprotocol/graph-cli
We use docker compose for developoing the subgraph. Our docker-compose file includes basic containers like graph node, ifps and postgresql and we add one more container(ganache-cli) for convenience
docker-compose up -d
yarn deploy-contracts:local
: Deploy elyfi contrats to ganacheyarn prepare:local
: Generate subgraph.yamlyarn codegen
yarn create:local
yarn deploy:local
For test transaction data,
yarn task createDeposit --network ganache
yarn task createWithdraw --newtork ganache
HTTP error creating the subgraph: ECONNREFUSED
raised then remove data dictory
docker-compose up -d
yarn deploy:core --network ganache
onlib/elyfi
projectyarn deploy:reserve --network ganache --tags dai_reserve
onlib/elyfi
projectyarn prepare:local
: Generate subgraph.yamlyarn codegen
yarn create:local
yarn deploy:local
graph auth --studio ACCESS_KEY
. You can find the ACCESS_KEY in https://thegraph.com/studio/subgraph/elyfi/graph codegen <MANIFEST_FILE> && graph build
. For example, <MANIFEST_FILE> issubgraph-mainnet.yaml
in mainnet, the default issubgraph.yaml
.graph deploy --studio elyfi
with new version
See https://thegraph.academy/developers/subgraph-development-guide/ for details.