1

graph-node from TheGraph can get data from blockchain.

From https://github.com/graphprotocol/graph-node/blob/master/docs/getting-started.md

cargo run -p graph-node --release -- \
  --postgres-url postgresql://<USERNAME><:PASSWORD>@localhost:5432/<POSTGRES_DB_NAME> \
  --ethereum-rpc <ETHEREUM_NETWORK_NAME>:https://mainnet.infura.io \
  --ipfs 127.0.0.1:5001 \
  --debug

So running with --ethereum-rpc mainnet:https://mainnet.infura.io

But how to have one graph-node to several blockchains, e.g. one Ethereum mainnet and one Ethereum testnet ?

Paul Verest
  • 60,022
  • 51
  • 208
  • 332

1 Answers1

1

You can pass multiple --ethereum-rpc in the command

e.g.

cargo run -p graph-node --release -- \
  --postgres-url postgresql://<USERNAME><:PASSWORD>@localhost:5432/<POSTGRES_DB_NAME> \
  --ethereum-rpc mainnet:https://mainnet.infura.io \
  --ethereum-rpc goerli:https://...
  --ipfs 127.0.0.1:5001 \
  --debug

Ref: https://github.com/graphprotocol/graph-node/pull/1027

timqian
  • 3,106
  • 1
  • 14
  • 11