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

Initialising subgraphs indexing Proxy Contracts #528

Merged
merged 5 commits into from
Oct 23, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions website/pages/en/deploying/hosted-service.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
title: What is the Hosted Service?
---

> Please note, the hosted service will begin sunsetting in 2023, but it will remain available to networks that are not supported on the decentralized network. Developers are encouraged to [upgrade their subgraphs to The Graph Network](/cookbook/upgrading-a-subgraph) as more networks are supported. Each network will have their hosted service equivalents gradually sunset to ensure developers have enough time to upgrade subgraphs to the decentralized network. Read more about the sunsetting of the hosted service [here](https://thegraph.com/blog/sunsetting-hosted-service).
> Please note, the hosted service will begin sunsetting in Q1 2023, but it will remain available to networks that are not supported on the decentralized network. Developers are encouraged to [migrate their subgraphs](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) as more networks are supported. Each network will have their hosted service equivalents gradually sunset to ensure developers have enough time to migrate subgraphs to the decentralized network. Read more about the sunsetting of the Hosted Service [here](https://thegraph.com/blog/sunsetting-hosted-service).

This section will walk you through deploying a subgraph to the [hosted service](https://thegraph.com/hosted-service/).
This section will walk you through deploying a subgraph to the [Hosted Service](https://thegraph.com/hosted-service/).

If you don't have an account on the hosted service, you can sign up with your GitHub account. Once you authenticate, you can start creating subgraphs through the UI and deploying them from your terminal. The hosted service supports a number of networks, such as Polygon, Gnosis Chain, BNB Chain, Optimism, Arbitrum, and more.
If you don't have an account on the hosted service, you can sign up with your GitHub account. Once you authenticate, you can start creating subgraphs through the UI and deploying them from your terminal. The Hosted Service supports a number of networks, such as Polygon, Gnosis Chain, BNB Chain, Optimism, Arbitrum, and more.
itsjerryokolo marked this conversation as resolved.
Show resolved Hide resolved

For a comprehensive list, see [Supported Networks](/developing/supported-networks/#hosted-service).

Expand Down Expand Up @@ -46,6 +46,19 @@ graph init --from-example --product hosted-service <GITHUB_USER>/<SUBGRAPH_NAME>

The example subgraph is based on the Gravity contract by Dani Grant that manages user avatars and emits `NewGravatar` or `UpdateGravatar` events whenever avatars are created or updated. The subgraph handles these events by writing `Gravatar` entities to the Graph Node store and ensuring these are updated according to the events. Continue on to the [subgraph manifest](/developing/creating-a-subgraph#the-subgraph-manifest) to better understand which events from your smart contracts to pay attention to, mappings, and more.

## Supported Networks on the hosted service

### From a Proxy Contract

To build a subgraph tailored for monitoring a Proxy contract, initialize the subgraph by specifying the address of the implementation contract. Once the initialization process is concluded, the last step involves updating the network name in the subgraph.yaml file to the address of the Proxy contract.
You can use the command below.
itsjerryokolo marked this conversation as resolved.
Show resolved Hide resolved

```sh
graph init \
--product hosted-service
--from-contract <IMPLEMENTATION_ADDRESS> \
<GITHUB_USER>/<SUBGRAPH_NAME> [<DIRECTORY>]
```

## Supported Networks on the Hosted Service
itsjerryokolo marked this conversation as resolved.
Show resolved Hide resolved

You can find the list of the supported networks [Here](/developing/supported-networks).