File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 4
4
5
5
## 流程概述
6
6
7
- - 在 Ropsten 部署一个合约,并调用触发事件。
7
+ - 在 Rinkeby 部署一个合约,并调用触发事件。
8
8
- 创建定义数据索引的 Subgraph。
9
9
- 部署 Subgraph 到 TheGraph,实现数据索引。
10
10
- 在前端 DApp 中查询索引数据。
@@ -33,7 +33,7 @@ TheGraph 中定义如何为数据建立索引,称为 Subgraph,它包含三
33
33
3. 部署合约(用于测试 graph 的简单合约)
34
34
35
35
` ` ` bash
36
- npx hardhat run ./scripts/deploy.js --network ropsten
36
+ npx hardhat run ./scripts/deploy.js --network rinkeby
37
37
` ` `
38
38
39
39
输出信息类似如下:
@@ -72,7 +72,7 @@ TheGraph 中定义如何为数据建立索引,称为 Subgraph,它包含三
72
72
` ` `
73
73
74
74
- 在 " Subgraph name" 和 " Directory to create the subgraph" 直接回车即可
75
- - Ethereum network 这里选择 ropsten
75
+ - Ethereum network 这里选择 rinkeby
76
76
- " Contract address" 这里输入在步骤 3 中部署合约时生成的合约地址
77
77
- 上面执行到 " fetch ABI from Etherscan" 时会报执行失败,然后出现 " ABI file (path)" 字样,提示输入本机中 abi 的文件路径,这里我们输入 SimpleToken.json 所在的路径即可(` ./abis/SimpleToken.json` )
78
78
- 如果 yarn install 失败(例如网络错误),可以进入新生成的项目目录,手动安装 npm 依赖
You can’t perform that action at this time.
0 commit comments