Skip to content

Commit

Permalink
docs[refactor]: Update all occurrences of goerli to sepolia (#680)
Browse files Browse the repository at this point in the history
docs refactor: change all occurances of goerli to sepolia
  • Loading branch information
shiyasmohd authored Jun 4, 2024
1 parent b2d199a commit e8731a1
Show file tree
Hide file tree
Showing 157 changed files with 951 additions and 951 deletions.
38 changes: 19 additions & 19 deletions website/pages/ar/cookbook/grafting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ By adhering to these guidelines, you minimize risks and ensure a smoother migrat

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:

- [Subgraph example repo](https://github.com/t-proctor/grafting-tutorial)
- [Subgraph example repo](https://github.com/Shiyasmohd/grafting-tutorial)

> Note: The contract used in the subgraph was taken from the following [Hackathon Starterkit](https://github.com/schmidsi/hackathon-starterkit).
Expand All @@ -59,11 +59,11 @@ schema:
dataSources:
- kind: ethereum
name: Lock
network: goerli
network: sepolia
source:
address: '0x4Ed995e775D3629b0566D2279f058729Ae6EA493'
address: '0xb3aabe721794b85fe4e72134795c2f93b4eb7e63'
abi: Lock
startBlock: 7674603
startBlock: 5955690
mapping:
kind: ethereum/events
apiVersion: 0.0.6
Expand All @@ -80,7 +80,7 @@ dataSources:
```
- The `Lock` data source is the abi and contract address we will get when we compile and deploy the contract
- The network should correspond to a indexed network being queried. Since we're running on Goerli testnet, the network is `goerli`
- The network should correspond to a indexed network being queried. Since we're running on Sepolia testnet, the network is `sepolia`
- 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.

## Grafting Manifest Definition
Expand All @@ -103,7 +103,7 @@ The `base` and `block` values can be found by deploying two subgraphs: one for t

## Deploying the Base Subgraph

1. Go to [The Graph Studio UI](https://thegraph.com/studio/) and create a subgraph on Goerli testnet called `graft-example`
1. Go to [The Graph Studio UI](https://thegraph.com/studio/) and create a subgraph on Sepolia testnet called `graft-example`
2. Follow the directions in the `AUTH & DEPLOY` section on your subgraph page in the `graft-example` folder from the repo
3. Once finished, verify the subgraph is indexing properly. If you run the following command in The Graph Playground

Expand All @@ -124,14 +124,14 @@ It returns something like this:
"data": {
"withdrawals": [
{
"id": "0x13098b538a61837e9f29b32fb40527bbbe63c9120c250242b02b69bb42c287e5-5",
"id": "0xe8323d21c4f104607b10b0fff9fc24b9612b9488795dea8196b2d5f980d3dc1d0a000000",
"amount": "0",
"when": "1664367528"
"when": "1716394824"
},
{
"id": "0x800c92fcc0edbd26f74e19ad058c62008a47c7789f2064023b987028343dd498-3",
"id": "0xea1cee35036f2cacb72f2a336be3e54ab911f5bebd58f23400ebb8ecc5cfc45203000000",
"amount": "0",
"when": "1664367648"
"when": "1716394848"
}
]
}
Expand All @@ -144,8 +144,8 @@ Once you have verified the subgraph is indexing properly, you can quickly update

The graft replacement subgraph.yaml will have a new contract address. This could happen when you update your dapp, redeploy a contract, etc.

1. Go to [The Graph Studio UI](https://thegraph.com/studio/) and create a subgraph on Goerli testnet called `graft-replacement`
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.
1. Go to [The Graph Studio UI](https://thegraph.com/studio/) and create a subgraph on Sepolia testnet called `graft-replacement`
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.
3. Follow the directions in the `AUTH & DEPLOY` section on your subgraph page in the `graft-replacement` folder from the repo
4. Once finished, verify the subgraph is indexing properly. If you run the following command in The Graph Playground

Expand All @@ -166,26 +166,26 @@ It should return the following:
"data": {
"withdrawals": [
{
"id": "0x13098b538a61837e9f29b32fb40527bbbe63c9120c250242b02b69bb42c287e5-5",
"id": "0xe8323d21c4f104607b10b0fff9fc24b9612b9488795dea8196b2d5f980d3dc1d0a000000",
"amount": "0",
"when": "1664367528"
"when": "1716394824"
},
{
"id": "0x800c92fcc0edbd26f74e19ad058c62008a47c7789f2064023b987028343dd498-3",
"id": "0xea1cee35036f2cacb72f2a336be3e54ab911f5bebd58f23400ebb8ecc5cfc45203000000",
"amount": "0",
"when": "1664367648"
"when": "1716394848"
},
{
"id": "0xb4010e4c76f86762beb997a13cf020231778eaf7c64fa3b7794971a5e6b343d3-22",
"id": "0x2410475f76a44754bae66d293d14eac34f98ec03a3689cbbb56a716d20b209af06000000",
"amount": "0",
"when": "1664371512"
"when": "1716429732"
}
]
}
}
```

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.
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.

Congrats! You have succesfully grafted a subgraph onto another subgraph.

Expand Down
4 changes: 2 additions & 2 deletions website/pages/ar/cookbook/upgrading-a-subgraph.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ graph deploy --studio <SUBGRAPH_SLUG>

- Updating is just publishing another version of your existing subgraph on-chain.
- 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.
- 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.
- 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.

7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button.

Expand Down Expand Up @@ -146,7 +146,7 @@ More information about the nature of the network and how to handle re-orgs are d

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.

1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli.
1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Sepolia.
2. انشر ما يلي وحدد الإصدار الجديد في الأمر (مثل v0.0.1 ، v0.0.2 ، إلخ):

```sh
Expand Down
28 changes: 14 additions & 14 deletions website/pages/ar/deploying/deploying-a-subgraph-to-hosted.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ If you don't have a `networks.json` file, you'll need to manually create one wit

**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.

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`:
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`:

```yaml
# ...
Expand All @@ -124,7 +124,7 @@ This is what your networks config file should look like:
"address": "0x123..."
}
},
"goerli": {
"sepolia": {
"Gravity": {
"address": "0xabc..."
}
Expand All @@ -136,20 +136,20 @@ Now we can run one of the following commands:

```sh
# Using default networks.json file
yarn build --network goerli
yarn build --network sepolia

# Using custom named file
yarn build --network goerli --network-file path/to/config
yarn build --network sepolia --network-file path/to/config
```

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:
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:

```yaml
# ...
dataSources:
- kind: ethereum/contract
name: Gravity
network: goerli
network: sepolia
source:
address: '0xabc...'
abi: Gravity
Expand All @@ -163,17 +163,17 @@ Now you are ready to `yarn deploy`.

```sh
# Using default networks.json file
yarn deploy --network goerli
yarn deploy --network sepolia
# Using custom named file
yarn deploy --network goerli --network-file path/to/config
yarn deploy --network sepolia --network-file path/to/config
```

### Using subgraph.yaml template

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/).

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:
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:

```json
{
Expand All @@ -186,7 +186,7 @@ and

```json
{
"network": "goerli",
"network": "sepolia",
"address": "0xabc..."
}
```
Expand Down Expand Up @@ -216,7 +216,7 @@ In order to generate a manifest to either network, you could add two additional
"scripts": {
...
"prepare:mainnet": "mustache config/mainnet.json subgraph.template.yaml > subgraph.yaml",
"prepare:goerli": "mustache config/goerli.json subgraph.template.yaml > subgraph.yaml"
"prepare:sepolia": "mustache config/sepolia.json subgraph.template.yaml > subgraph.yaml"
},
"devDependencies": {
...
Expand All @@ -225,14 +225,14 @@ In order to generate a manifest to either network, you could add two additional
}
```

To deploy this subgraph for mainnet or Goerli you would now simply run one of the two following commands:
To deploy this subgraph for mainnet or sepolia you would now simply run one of the two following commands:

```sh
# Mainnet:
yarn prepare:mainnet && yarn deploy
# Goerli:
yarn prepare:goerli && yarn deploy
# Sepolia:
yarn prepare:sepolia && yarn deploy
```

A working example of this can be found [here](https://github.com/graphprotocol/example-subgraph/tree/371232cf68e6d814facf5e5413ad0fef65144759).
Expand Down
2 changes: 1 addition & 1 deletion website/pages/ar/deploying/subgraph-studio.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Check out the video overview below as well:

<VideoEmbed youtube="HfDgC2oNnwo" />

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.
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.

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!

Expand Down
6 changes: 3 additions & 3 deletions website/pages/ar/developing/developer-faqs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Unfortunately, this is currently not possible. `graph init` is intended as a bas

ضمن ال Subgraph ، تتم معالجة الأحداث دائمًا بالترتيب الذي تظهر به في الكتل ، بغض النظر عما إذا كان ذلك عبر عقود متعددة أم لا.

## 14. Is it possible to differentiate between networks (mainnet, Goerli, local) from within event handlers?
## 14. Is it possible to differentiate between networks (mainnet, sepolia, local) from within event handlers?

نعم. يمكنك القيام بذلك عن طريق استيراد `graph-ts` كما في المثال أدناه:

Expand All @@ -77,9 +77,9 @@ Unfortunately, this is currently not possible. `graph init` is intended as a bas
()dataSource.address
```

## 15. Do you support block and call handlers on Goerli?
## 15. Do you support block and call handlers on Sepolia?

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.
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.

## 16. Can I import ethers.js or other JS libraries into my subgraph mappings?

Expand Down
2 changes: 1 addition & 1 deletion website/pages/ar/developing/supported-networks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const getStaticProps = getStaticPropsForSupportedNetworks(__filename)

The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints.

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.
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.

Subgraphs indexing Gnosis Chain can now be deployed with the `gnosis` network identifier. `xdai` is still supported for existing hosted service subgraphs.

Expand Down
2 changes: 1 addition & 1 deletion website/pages/ar/publishing/publishing-a-subgraph.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You can find the list of the supported networks [Here](/developing/supported-net

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/).

- Subgraphs can be published to Goerli, Arbitrum goerli, Arbitrum One, or Ethereum mainnet.
- Subgraphs can be published to Sepolia, Arbitrum Sepolia, Arbitrum One, or Ethereum mainnet.

- Regardless of the network the subgraph was published on, it can index data on any of the [supported networks](/developing/supported-networks).

Expand Down
Loading

0 comments on commit e8731a1

Please sign in to comment.