You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/indexer/build/multi-chain.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ This feature is not compatible with [Historical State](../run_publish/historical
47
47
48
48
Creating a multi-chain project involves several steps that enable you to index multiple networks into a single database. This is achieved by configuring a multi-chain manifest file, generating required entities and datasource templates, adding new projects to the manifest, and publishing the multi-chain project.
49
49
50
-
:::info See a realworld example
50
+
:::info See a real-world example
51
51
You can see an example project with all of this correctly enabled [here](https://github.com/subquery/subql-starter/tree/main/Multi-chain/transfers)
52
52
:::
53
53
@@ -70,7 +70,7 @@ projects:
70
70
### 2. Generate Required Entities, Datasource Templates, and ABIs
71
71
72
72
Use the `subql codegen` command to generate the required entities, datasource templates, and ABIs for all the projects listed in the multi-chain manifest file. By default, the codegen command will look for `subquery-multichain.yaml` if no multichain file is explicitly mentioned through `-f` flag
73
-
If you have `@subql/cli` version `5.0.0` or above, you will need to install `@subql/common-ethereum` package in the dependencies before execute this command.
73
+
If you have `@subql/cli` version `5.0.0` or above, you will need to install `@subql/common-ethereum` package in the dependencies before executing this command.
74
74
75
75
### 3. Add a New Network to the Multi-Chain Manifest
This command adds `project-newchain.yaml` to the `subquery-multichain.yaml` manifest. It both introduces the new chain and integrates the necessary [GraphQL schema](./graphql.md) into its corresponding `project-xxxx.yaml` file, a critical step for ensuring the proper functioning of multi-chain indexing.
86
86
87
-
This command also updates `docker-compose.yml` with the new service. All projects must index to the same PostgreSQL table schema, this is set in your `docker-compose.yml`:
87
+
This command also updates `docker-compose.yml` with the new service. All projects must index to the same PostgreSQL table schema, which is set in your `docker-compose.yml`:
88
88
89
89
```yaml
90
90
subquery-node-newchain:
@@ -105,7 +105,7 @@ Use `subql publish` command to publish all the projects listed in the `subquery-
105
105
106
106
### See the Example Project
107
107
108
-
The repository for this example can be found [here](https://github.com/subquery/subql-starter/tree/main/Multi-chain/transfers), it is an example of a multichain project that indexes multiple networks (in this case Polkadot and Kusama) into the same database.
108
+
The repository for this example can be found [here](https://github.com/subquery/subql-starter/tree/main/Multi-chain/transfers). It is an example of a multichain project that indexes multiple networks (in this case, Polkadot and Kusama) into the same database.
109
109
110
110
A modified `docker-compose.yaml` file has been included, with two subql/node images, one for each network being indexed. You will notice that that each image maps to a separate manifest file (see [command line references](../run_publish/references.md)).
111
111
@@ -128,7 +128,7 @@ const transfer = new Transfer(
128
128
);
129
129
```
130
130
131
-
It can also be helpful to save all entities with a property indicating the source network so you can filter like below:
131
+
It can also be helpful to save all entities with a property indicating the source network, so you can filter like below:
132
132
133
133
```graphql
134
134
query {
@@ -171,7 +171,7 @@ In many cases, you will have a completely different set of mapping handlers to d
171
171
172
172
If you are intending to mutate data across chain, e.g. an action in one network will affect an entity saved from another, then please be aware that SubQuery provides no guarantees of cross-chain ordering.
173
173
174
-
For example, one chain may index much faster than the other, and when indexing a cross-chain transaction, indexer B may encounter the receipt of this transaction on chain B well before the indexer A encounters that the transaction has been sent on chain A.
174
+
For example, one chain may index much faster than the other, and when indexing a cross-chain transaction, indexer B may encounter the receipt of this transaction on chain B well before indexer A encounters that the transaction has been sent on chain A.
175
175
176
176
We suggest designing your entities to avoid or handle cross-chain race conditions so that chain B can safely record the receipt of the transaction without requiring that chain A has already recorded that the transaction has been sent.
177
177
@@ -190,7 +190,7 @@ When querying metadata using GraphQL with multi-chain enabled, you need to pass
190
190
}
191
191
```
192
192
193
-
To query metadata from all metadata tables you can use the query shown below. There are no arguments in this query, so you cannot filter or sort.
193
+
To query metadata from all metadata tables, you can use the query shown below. There are no arguments in this query, so you cannot filter or sort.
0 commit comments