Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
18 changes: 11 additions & 7 deletions pages/en/cookbook/migrating-a-subgraph.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Migrating an Existing Subgraph to The Graph Network

## Introduction

This is a guide on how to migrate your subgraph from the Hosted Service to The Graph's decentralized network. Migration to The Graph Network has been successful for projects like Opyn, UMA, mStable, Audius, PoolTogether, Livepeer, RAI, Enzyme, DODO, Pickle, and BadgerDAO all of which are relying on data served by Indexers on the network. There are now over 200 subgraphs live on The Graph Network, generating query fees and actively indexing web3 data.
This is a guide on how to migrate your subgraph from the Hosted Service to The Graph's decentralized network. Migration to The Graph Network has been successful for projects like Opyn, UMA, mStable, Audius, PoolTogether, Livepeer, RAI, Enzyme, DODO, Pickle, and BadgerDAO all of which are relying on data served by Indexers on the network. There are now over 600 subgraphs live on The Graph's decentralized network, generating query fees and actively indexing web3 data.

The process of migration is quick and your subgraphs will forever benefit from the reliability and performance that you can only get on The Graph Network.

Expand Down Expand Up @@ -82,26 +82,30 @@ You can generate an API key in Subgraph Studio [here](https://thegraph.com/studi

![API key creation page](/img/api-image.png)

At the end of each week, an invoice will be generated based on the query fees that have been incurred during this period. This invoice will be paid automatically using the GRT available in your balance. Your balance will be updated after the cost of your query fees are withdrawn. Query fees are paid in GRT via the Polygon network. You will need to add GRT to the Polygon billing contract to enable your API key via the following steps:
At the end of each week, an invoice will be generated based on the query fees that have been incurred during this period. This invoice will be paid automatically using the GRT available in your balance. Your balance will be updated after the cost of your query fees are withdrawn. Query fees are paid in GRT via the Arbitrum network. You will need to add GRT to the Arbitrum billing contract to enable your API key via the following steps:

- Purchase GRT on an exchange of your choice.
- Send the GRT to your wallet.
- On the Billing page in Studio, click on Add GRT.

![Add GRT in billing](/img/add-grt-in-billing.png)
![Add GRT in billing](/img/Add-GRT-New-Page.png)

- Follow the steps to bridge the GRT to Polygon.
- Once bridged, add the GRT to your billing balance.
- Follow the steps to add your GRT to your billing balance.
- Your GRT will be automatically bridged to the Arbitrum network and added to your billing balance.

![Billing pane](/img/billing-pane.png)
![Billing pane](/img/New-Billing-Pane.png)

> Note: This process is slightly different if you are using a multisig since you can not bridge GRT to Polygon with a multisig. You would need to send the GRT to an EOA (externally owned address) and bridge it from there to Polygon. Once on Polygon, you can load the multisig address. We have created [a special tool to help you through these steps](https://multisig-billing.thegraph.com/).
> Note: see the [official billing page](../billing.mdx) for full instructions on adding GRT to your billing balance.

### Securing your API key

It is recommended that you secure the API by limiting its usage in two ways:

1. Authorized Subgraphs
2. Authorized Domain

You can secure your API key [here](https://thegraph.com/studio/apikeys/test/).

![Subgraph lockdown page](/img/subgraph-lockdown.png)

### Querying your subgraph on the decentralized network
Expand Down
Binary file added public/img/Add-GRT-New-Page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/New-Billing-Pane.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/img/add-grt-in-billing.png
Binary file not shown.
Binary file removed public/img/billing-pane.png
Binary file not shown.