繁体   English   中英

如何在 rinkeby 测试 rpc 中运行图形节点

[英]How to run the graph-node in the rinkeby test rpc

我正在尝试为部署在 rinkeby 测试网络中的合同编写子图。

为此,我需要在同一个 rinkeby 测试网络中运行图形节点。

参考以下回购

https://github.com/graphprotocol/graph-node

我使用下面的 cargo 命令在我的本地机器上运行它

cargo run -p graph-node --release --  --postgres-url postgresql://postgres:postgres@localhost:5432/graph-node  --ethereum-rpc 'rinkeby:https://rinkeby.infura.io/v3/2a46ac7cdb4c44acac4de87dadfd6e39'  --ipfs 127.0.0.1:5001

我使用 infura.io 来获取 rinkeby rpc url。

但它会引发错误 401 Unauthorized。 我不知道我在哪里犯错误。

在此处输入图像描述

我无法连接 rinkeby 网络。

请帮我解决这个问题。

提前致谢。

看起来您的 Infura 端点设置不正确,请检查您的项目 ID 和您在帐户中设置的权限,可以在此处或通过您的 Infura 登录找到一些示例: https://infura.io/docs/gettingStarted /chooseaNetwork

我在命令中犯了一个错误。

删除 rpc url 中的单引号可解决问题

cargo run -p graph-node --release -- --postgres-url postgresql://postgres:postgres@localhost:5432/graph-node --ethereum-rpc rinkeby:https://rinkeby.infura.io/v3/2a46ac7cdb4c44acac4de87dadfd6e39 --ipfs 127.0.0.1:5001

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM