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 3 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
15 changes: 14 additions & 1 deletion website/pages/en/deploying/hosted-service.mdx
Original file line number Diff line number Diff line change
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).
Loading