This subgraph aims to index the data generated by the smart contracts of Verax.
Our subgraph is deployable on all the networks where Verax is deployed.
You can replace XXX
by the name of the networks you want to work on in the commands below:
linea-sepolia
linea
arbitrum-sepolia
arbitrum-one
base-sepolia
base
bsc-testnet
bsc
pnpm run codegen:vY
pnpm run build:XXX:vY
pnpm run deploy:XXX:vY
When the contracts of a new Verax instance are deployed, we need to start indexing the data generated by these contracts.
- Add the new network config in the networks.json file:
"XXX": { "AttestationRegistry": { "address": "0x...", "startBlock": 123 }, "ModuleRegistry": { "address": "0x...", "startBlock": 123 }, "PortalRegistry": { "address": "0x...", "startBlock": 123 }, "SchemaRegistry": { "address": "0x...", "startBlock": 123 } },
- Create a subgraph config file for the new network, based on the
subgraph.linea-mainnet.yaml file, name
subgraph.XXX.yaml
. - Add a "build" script in the package.json file to easily build it:
"build:XXX:v2": "pnpm run codegen:v2 && graph build subgraph.XXX.yaml",
- Add a "deploy" script in the package.json file to easily deploy it
"deploy:XXX:v2": "graph deploy --version-label v0.0.1 --studio XXX subgraph.XXX.yaml",
- Check that the subgraph compiles and builds correctly:
pnpm run build:XXX:v2
- Create the subgraph XXX on The Graph Studio
- Authenticate to The Graph Studio:
graph auth <ACCESS_TOKEN>
- Deploy the subgraph:
pnpm run deploy:XXX:v2