TheGraph: один граф-узел для нескольких блокчейнов?
из TheGraph можно получить данные из блокчейна.
С 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
Так бежит с
--ethereum-rpc mainnet:https://mainnet.infura.io
Но как иметь один
graph-node
к нескольким блокчейнам, например, к одной основной сети Ethereum и одной тестовой сети Ethereum?
1 ответ
Вы можете пройти несколько--ethereum-rpc
в команде
например
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
Ссылка: https://github.com/graphprotocol/graph-node/pull/1027