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: website/pages/ar/cookbook/grafting.mdx
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ By adhering to these guidelines, you minimize risks and ensure a smoother migrat
44
44
45
45
Building subgraphs is an essential part of The Graph, described more in depth [here](http://localhost:3000/en/cookbook/quick-start/). To be able to build and deploy the existing subgraph used in this tutorial, the following repo is provided:
46
46
47
-
-[Subgraph example repo](https://github.com/t-proctor/grafting-tutorial)
47
+
-[Subgraph example repo](https://github.com/Shiyasmohd/grafting-tutorial)
48
48
49
49
> Note: The contract used in the subgraph was taken from the following [Hackathon Starterkit](https://github.com/schmidsi/hackathon-starterkit).
- The `Lock` data source is the abi and contract address we will get when we compile and deploy the contract
83
-
- The network should correspond to a indexed network being queried. Since we're running on Goerli testnet, the network is `goerli`
83
+
- The network should correspond to a indexed network being queried. Since we're running on Sepolia testnet, the network is `sepolia`
84
84
- The `mapping` section defines the triggers of interest and the functions that should be run in response to those triggers. In this case, we are listening for the `Withdrawal` event and calling the `handleWithdrawal` function when it is emitted.
85
85
86
86
## Grafting Manifest Definition
@@ -103,7 +103,7 @@ The `base` and `block` values can be found by deploying two subgraphs: one for t
103
103
104
104
## Deploying the Base Subgraph
105
105
106
-
1. Go to [The Graph Studio UI](https://thegraph.com/studio/) and create a subgraph on Goerli testnet called `graft-example`
106
+
1. Go to [The Graph Studio UI](https://thegraph.com/studio/) and create a subgraph on Sepolia testnet called `graft-example`
107
107
2. Follow the directions in the `AUTH & DEPLOY` section on your subgraph page in the `graft-example` folder from the repo
108
108
3. Once finished, verify the subgraph is indexing properly. If you run the following command in The Graph Playground
109
109
@@ -124,14 +124,14 @@ It returns something like this:
@@ -144,8 +144,8 @@ Once you have verified the subgraph is indexing properly, you can quickly update
144
144
145
145
The graft replacement subgraph.yaml will have a new contract address. This could happen when you update your dapp, redeploy a contract, etc.
146
146
147
-
1. Go to [The Graph Studio UI](https://thegraph.com/studio/) and create a subgraph on Goerli testnet called `graft-replacement`
148
-
2. Create a new manifest. The `subgraph.yaml` for `graph-replacement` contains a different contract address and new information about how it should graft. These are the `block` of the [last event emitted](https://goerli.etherscan.io/tx/0x800c92fcc0edbd26f74e19ad058c62008a47c7789f2064023b987028343dd498) you care about by the old contract and the `base` of the old subgraph. The `base` subgraph ID is the `Deployment ID` of your original `graph-example` subgraph. You can find this in The Graph Studio UI.
147
+
1. Go to [The Graph Studio UI](https://thegraph.com/studio/) and create a subgraph on Sepolia testnet called `graft-replacement`
148
+
2. Create a new manifest. The `subgraph.yaml` for `graph-replacement` contains a different contract address and new information about how it should graft. These are the `block` of the [last event emitted](https://sepolia.etherscan.io/tx/0xea1cee35036f2cacb72f2a336be3e54ab911f5bebd58f23400ebb8ecc5cfc452) you care about by the old contract and the `base` of the old subgraph. The `base` subgraph ID is the `Deployment ID` of your original `graph-example` subgraph. You can find this in The Graph Studio UI.
149
149
3. Follow the directions in the `AUTH & DEPLOY` section on your subgraph page in the `graft-replacement` folder from the repo
150
150
4. Once finished, verify the subgraph is indexing properly. If you run the following command in The Graph Playground
151
151
@@ -166,26 +166,26 @@ It should return the following:
You can see that the `graft-replacement` subgraph is indexing from older `graph-example` data and newer data from the new contract address. The original contract emitted two `Withdrawal` events, [Event 1](https://goerli.etherscan.io/tx/0x800c92fcc0edbd26f74e19ad058c62008a47c7789f2064023b987028343dd498) and [Event 2](https://goerli.etherscan.io/address/0x4ed995e775d3629b0566d2279f058729ae6ea493). The new contract emitted one `Withdrawal` after, [Event 3](https://goerli.etherscan.io/tx/0xb4010e4c76f86762beb997a13cf020231778eaf7c64fa3b7794971a5e6b343d3). The two previously indexed transactions (Event 1 and 2) and the new transaction (Event 3) were combined together in the `graft-replacement` subgraph.
188
+
You can see that the `graft-replacement` subgraph is indexing from older `graph-example` data and newer data from the new contract address. The original contract emitted two `Withdrawal` events, [Event 1](https://sepolia.etherscan.io/tx/0xe8323d21c4f104607b10b0fff9fc24b9612b9488795dea8196b2d5f980d3dc1d) and [Event 2](https://sepolia.etherscan.io/tx/0xea1cee35036f2cacb72f2a336be3e54ab911f5bebd58f23400ebb8ecc5cfc452). The new contract emitted one `Withdrawal` after, [Event 3](https://sepolia.etherscan.io/tx/0x2410475f76a44754bae66d293d14eac34f98ec03a3689cbbb56a716d20b209af). The two previously indexed transactions (Event 1 and 2) and the new transaction (Event 3) were combined together in the `graft-replacement` subgraph.
189
189
190
190
Congrats! You have succesfully grafted a subgraph onto another subgraph.
- Updating is just publishing another version of your existing subgraph on-chain.
74
74
- Because this incurs a cost, it is highly recommended to deploy and test your subgraph in the Subgraph Studio, using the "Development Query URL" before publishing. See an example transaction [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Prices are roughly around 0.0425 ETH at 100 gwei.
75
-
- Any time you need to update your subgraph, you will be charged an update fee. Because this incurs a cost, it is highly recommended to deploy and test your subgraph on Goerli before deploying to mainnet. It can, in some cases, also require some GRT if there is no signal on that subgraph. In the case there is signal/curation on that subgraph version (using auto-migrate), the taxes will be split.
75
+
- Any time you need to update your subgraph, you will be charged an update fee. Because this incurs a cost, it is highly recommended to deploy and test your subgraph on Sepolia before deploying to mainnet. It can, in some cases, also require some GRT if there is no signal on that subgraph. In the case there is signal/curation on that subgraph version (using auto-migrate), the taxes will be split.
76
76
77
77
7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button.
78
78
@@ -146,7 +146,7 @@ More information about the nature of the network and how to handle re-orgs are d
146
146
147
147
If you would like to update an existing subgraph on the network, you can do this by deploying a new version of your subgraph to the Subgraph Studio using the Graph CLI.
148
148
149
-
1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli.
149
+
1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Sepolia.
150
150
2. انشر ما يلي وحدد الإصدار الجديد في الأمر (مثل v0.0.1 ، v0.0.2 ، إلخ):
Copy file name to clipboardExpand all lines: website/pages/ar/deploying/deploying-a-subgraph-to-hosted.mdx
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,7 +100,7 @@ If you don't have a `networks.json` file, you'll need to manually create one wit
100
100
101
101
**Note:** You don't have to specify any of the `templates` (if you have any) in the config file, only the `dataSources`. If there are any `templates` declared in the `subgraph.yaml` file, their network will be automatically updated to the one specified with the `--network` option.
102
102
103
-
Now, let's assume you want to be able to deploy your subgraph to the `mainnet` and `goerli` networks, and this is your `subgraph.yaml`:
103
+
Now, let's assume you want to be able to deploy your subgraph to the `mainnet` and `sepolia` networks, and this is your `subgraph.yaml`:
104
104
105
105
```yaml
106
106
# ...
@@ -124,7 +124,7 @@ This is what your networks config file should look like:
124
124
"address": "0x123..."
125
125
}
126
126
},
127
-
"goerli": {
127
+
"sepolia": {
128
128
"Gravity": {
129
129
"address": "0xabc..."
130
130
}
@@ -136,20 +136,20 @@ Now we can run one of the following commands:
The `build` command will update your `subgraph.yaml` with the `goerli` configuration and then re-compile the subgraph. Your `subgraph.yaml` file now should look like this:
145
+
The `build` command will update your `subgraph.yaml` with the `sepolia` configuration and then re-compile the subgraph. Your `subgraph.yaml` file now should look like this:
146
146
147
147
```yaml
148
148
# ...
149
149
dataSources:
150
150
- kind: ethereum/contract
151
151
name: Gravity
152
-
network: goerli
152
+
network: sepolia
153
153
source:
154
154
address: '0xabc...'
155
155
abi: Gravity
@@ -163,17 +163,17 @@ Now you are ready to `yarn deploy`.
One solution for older graph-cli versions that allows to parameterize aspects like contract addresses is to generate parts of it using a templating system like [Mustache](https://mustache.github.io/) or [Handlebars](https://handlebarsjs.com/).
175
175
176
-
To illustrate this approach, let's assume a subgraph should be deployed to mainnet and Goerli using different contract addresses. You could then define two config files providing the addresses for each network:
176
+
To illustrate this approach, let's assume a subgraph should be deployed to mainnet and Sepolia using different contract addresses. You could then define two config files providing the addresses for each network:
177
177
178
178
```json
179
179
{
@@ -186,7 +186,7 @@ and
186
186
187
187
```json
188
188
{
189
-
"network": "goerli",
189
+
"network": "sepolia",
190
190
"address": "0xabc..."
191
191
}
192
192
```
@@ -216,7 +216,7 @@ In order to generate a manifest to either network, you could add two additional
Copy file name to clipboardExpand all lines: website/pages/ar/deploying/subgraph-studio.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ Check out the video overview below as well:
66
66
67
67
<VideoEmbedyoutube="HfDgC2oNnwo" />
68
68
69
-
Remember, while you’re going through your publishing flow, you’ll be able to push to either mainnet or Goerli. If you’re a first-time subgraph developer, we highly suggest you start with publishing to Goerli, which is free to do. This will allow you to see how the subgraph will work in The Graph Explorer and will allow you to test curation elements.
69
+
Remember, while you’re going through your publishing flow, you’ll be able to push to either mainnet or sepolia. If you’re a first-time subgraph developer, we highly suggest you start with publishing to Sepolia, which is free to do. This will allow you to see how the subgraph will work in The Graph Explorer and will allow you to test curation elements.
70
70
71
71
Indexers need to submit mandatory Proof of Indexing records as of a specific block hash. Because publishing a subgraph is an action taken on-chain, remember that the transaction can take up to a few minutes to go through. Any address you use to publish the contract will be the only one able to publish future versions. Choose wisely!
Copy file name to clipboardExpand all lines: website/pages/ar/developing/developer-faqs.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ Unfortunately, this is currently not possible. `graph init` is intended as a bas
66
66
67
67
ضمن ال Subgraph ، تتم معالجة الأحداث دائمًا بالترتيب الذي تظهر به في الكتل ، بغض النظر عما إذا كان ذلك عبر عقود متعددة أم لا.
68
68
69
-
## 14. Is it possible to differentiate between networks (mainnet, Goerli, local) from within event handlers?
69
+
## 14. Is it possible to differentiate between networks (mainnet, sepolia, local) from within event handlers?
70
70
71
71
نعم. يمكنك القيام بذلك عن طريق استيراد `graph-ts` كما في المثال أدناه:
72
72
@@ -77,9 +77,9 @@ Unfortunately, this is currently not possible. `graph init` is intended as a bas
77
77
()dataSource.address
78
78
```
79
79
80
-
## 15. Do you support block and call handlers on Goerli?
80
+
## 15. Do you support block and call handlers on Sepolia?
81
81
82
-
Yes. Goerli supports block handlers, call handlers and event handlers. It should be noted that event handlers are far more performant than the other two handlers, and they are supported on every EVM-compatible network.
82
+
Yes. Sepolia supports block handlers, call handlers and event handlers. It should be noted that event handlers are far more performant than the other two handlers, and they are supported on every EVM-compatible network.
83
83
84
84
## 16. Can I import ethers.js or other JS libraries into my subgraph mappings?
The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints.
16
16
17
-
Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli.
17
+
Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Sepolia will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby, or Kovan as their staging/testing environment are encouraged to migrate to Sepolia.
18
18
19
19
Subgraphs indexing Gnosis Chain can now be deployed with the `gnosis` network identifier. `xdai` is still supported for existing hosted service subgraphs.
Copy file name to clipboardExpand all lines: website/pages/ar/publishing/publishing-a-subgraph.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ You can find the list of the supported networks [Here](/developing/supported-net
14
14
15
15
Subgraphs can be published to the decentralized network directly from the Subgraph Studio dashboard by clicking on the **Publish** button. Once a subgraph is published, it will be available to view in the [Graph Explorer](https://thegraph.com/explorer/).
16
16
17
-
- Subgraphs can be published to Goerli, Arbitrum goerli, Arbitrum One, or Ethereum mainnet.
17
+
- Subgraphs can be published to Sepolia, Arbitrum Sepolia, Arbitrum One, or Ethereum mainnet.
18
18
19
19
- Regardless of the network the subgraph was published on, it can index data on any of the [supported networks](/developing/supported-networks).
0 commit comments