Example of connecting an unsupported EVM network to The Graph on the Berachain testnet.
yarn install# Build
$ yarn build && yarn codegen
# Run docker
$ docker-compose up -d
# Create ipfs and database
$ yarn create-local
$ yarn deploy-local$ yarn remove-local
$ docker-compose down
$ rm -rf build & rm -rf data- You have docker installed
- You have node installed
- You have provided the correct RPC
- You have
graph-cliinstalled
In subgraph.yaml you can find the networks you want to listen to. You need to provide the start block for the network you want to listen to. Also, you can provide the subgraph name and the contract address. Final step is change networks.json to the network you want to listen to.
In docker-compose.yml you need to change ethereum value to the network you want to listen to and provide the correct RPC.
In src/mapping.ts you can find the handlers for the events. You can add more handlers for the events you want to listen to.
$ npm install -g @graphprotocol/graph-cli$ graph init