Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update subsquid.md #418

Closed

Conversation

wuzhong-papermoon
Copy link
Contributor

Copy link
Contributor

@eshaben eshaben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! just minor things!

@@ -11,7 +11,8 @@ description: 学习如何在Moonbeam和Moonriver上使用Subsquid运行Substrate

Subsquid为以太坊虚拟机(EVM)和Substrate数据均提供原生的完整支持。由于Moonbeam是一个基于Substrate的EVM兼容的智能合约平台,Subsquid可用于索引EVM的和基于Substrate的数据。Subsquid提供了一个Substrate Archive和Processor,还有一个EVM Archive和Processor。 Substrate Archive和Processor可用于索引Substrate和EVM数据。这使得开发者在单个项目中可以从任何Moonbeam网络中提取链上数据并处理EVM记录和Substrate实体(事件、extrinsics和储存项),并利用单个GraphQL端点提供搜索结果的相关数据。如果你只想索引EVM数据,推荐使用EVM Archive和Processor。

本指南将向您展示如何使用Subsquid创建Substrate和EVM项目,并将其配置为可以在Moonbeam上索引数据。
本快速指南将向您展示如何使用Subsquid创建Substrate和EVM项目,并将其配置为可以在Moonbeam上索引数据。如果需要更完整的端到端教程,请查看[使用Subsquid索引本地Moonbeam开发节点](/tutorials/integrations/local-subsquid/){target=_blank}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
本快速指南将向您展示如何使用Subsquid创建Substrate和EVM项目,并将其配置为可以在Moonbeam上索引数据。如果需要更完整的端到端教程,请查看[使用Subsquid索引本地Moonbeam开发节点](/tutorials/integrations/local-subsquid/){target=_blank}
本快速指南将向您展示如何使用Subsquid创建Substrate和EVM项目,并将其配置为可以在Moonbeam上索引数据。如果需要更完整的端到端教程,请查看[使用Subsquid索引本地Moonbeam开发节点](/tutorials/integrations/local-subsquid/){target=\_blank}

```

3. 修改`src/processor.ts`文件,squid在该文件中实例化处理器、配置处理器并附加处理函数。处理器从[Archive](https://docs.subsquid.io/archives/overview/){target=\_blank}(一个专门的数据湖)中获取历史链上数据。您需要将处理器配置为从与您索引数据的网络相对应的Archive(存档)中提取数据:
4. 修改`src/processor.ts`文件,squid在该文件中实例化处理器、配置处理器并附加处理函数。处理器从[Archive](https://docs.subsquid.io/archives/overview/){target=\_blank}(一个专门的数据湖)中获取历史链上数据。您需要将处理器配置为从与您索引数据的[网络](https://docs.subsquid.io/substrate-indexing/supported-networks/){target=_blank}相对应的Archive(存档)中提取数据:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. 修改`src/processor.ts`文件,squid在该文件中实例化处理器、配置处理器并附加处理函数。处理器从[Archive](https://docs.subsquid.io/archives/overview/){target=\_blank}(一个专门的数据湖)中获取历史链上数据。您需要将处理器配置为从与您索引数据的[网络](https://docs.subsquid.io/substrate-indexing/supported-networks/){target=_blank}相对应的Archive(存档)中提取数据:
4. 修改`src/processor.ts`文件,squid在该文件中实例化处理器、配置处理器并附加处理函数。处理器从[Archive](https://docs.subsquid.io/archives/overview/){target=\_blank}(一个专门的数据湖)中获取历史链上数据。您需要将处理器配置为从与您索引数据的[网络](https://docs.subsquid.io/substrate-indexing/supported-networks/){target=\_blank}相对应的Archive(存档)中提取数据:

});
```

这就是配置Subsquid项目以索引Moonbeam上的Substrate数据所需要做的全部工作!现在您可以更新`schema.graphql`、`typgen.json`和`src/processor.ts`文件来索引项目所需的数据!
!!! note
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
!!! note
!!! 注意事项


3. 修改`src/processor.ts`文件,squid在该文件中实例化处理器、配置处理器并附加处理函数。处理器从[Archive](https://docs.subsquid.io/archives/overview/){target=\_blank}(一个专门的数据湖)中获取历史链上数据。您需要将处理器配置为从与您索引数据的网络相对应的Archive(存档)中提取数据:
3. 修改`src/processor.ts`文件,squid在该文件中实例化处理器、配置处理器并附加处理函数。处理器从[Archive](https://docs.subsquid.io/archives/overview/){target=\_blank}(一个专门的数据湖)中获取历史链上数据。您需要将处理器配置为从与您索引数据的[网络](https://docs.subsquid.io/evm-indexing/supported-networks/){target=_blank}相对应的Archive(存档)中提取数据:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. 修改`src/processor.ts`文件,squid在该文件中实例化处理器、配置处理器并附加处理函数。处理器从[Archive](https://docs.subsquid.io/archives/overview/){target=\_blank}(一个专门的数据湖)中获取历史链上数据。您需要将处理器配置为从与您索引数据的[网络](https://docs.subsquid.io/evm-indexing/supported-networks/){target=_blank}相对应的Archive(存档)中提取数据:
3. 修改`src/processor.ts`文件,squid在该文件中实例化处理器、配置处理器并附加处理函数。处理器从[Archive](https://docs.subsquid.io/archives/overview/){target=\_blank}(一个专门的数据湖)中获取历史链上数据。您需要将处理器配置为从与您索引数据的[网络](https://docs.subsquid.io/evm-indexing/supported-networks/){target=\_blank}相对应的Archive(存档)中提取数据:

```

这就是配置Subsquid项目以索引Moonbeam上的EVM数据所需要做的全部工作!现在您可以更新`schema.graphql`、`typgen.json`和`src/processor.ts`文件来索引项目所需的数据!
!!! note
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
!!! note
!!! 注意事项

@eshaben eshaben closed this May 10, 2024
@eshaben eshaben deleted the Translate-803-revamp-subsquid-indexers branch May 10, 2024 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants