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

[fix] cleanup #665

Merged
merged 2 commits into from
May 7, 2024
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
2 changes: 1 addition & 1 deletion website/pages/en/arbitrum/arbitrum-faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ The bridge has been [heavily audited](https://code4rena.com/contests/2022-10-the

Adding GRT to your Arbitrum billing balance can be done with a one-click experience in [Subgraph Studio](https://thegraph.com/studio/). You'll be able to easily bridge your GRT to Arbitrum and fill your API keys in one transaction.

Visit the [Billing page](https://thegraph.com/docs/en/billing/) for more detailed instructions on adding, withdrawing, or acquiring GRT.
Visit the [Billing page](/billing/) for more detailed instructions on adding, withdrawing, or acquiring GRT.
2 changes: 1 addition & 1 deletion website/pages/en/cookbook/base-testnet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Finally, you can deploy your subgraph using this command:

### 5. Query your subgraph

Once your subgraph is deployed, you can query it from your dapp using the `Development Query URL` in the Subgraph Studio.
Once your subgraph is deployed, you can query it from your dapp using the `Development Query URL` in Subgraph Studio.

Note - Studio API is rate-limited. Hence should preferably be used for development and testing.

Expand Down
4 changes: 2 additions & 2 deletions website/pages/en/cookbook/grafting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The grafted subgraph can use a GraphQL schema that is not identical to the one o

For more information, you can check:

- [Grafting](https://thegraph.com/docs/en/developing/creating-a-subgraph#grafting-onto-existing-subgraphs)
- [Grafting](/developing/creating-a-subgraph#grafting-onto-existing-subgraphs)

In this tutorial, we will be covering a basic usecase. We will replace an existing contract with an identical contract (with a new address, but the same code). Then, graft the existing subgraph onto the "base" subgraph that tracks the new contract.

Expand Down Expand Up @@ -197,6 +197,6 @@ If you want more experience with grafting, here's a few examples for popular con
- [ERC-721](https://github.com/messari/subgraphs/blob/master/subgraphs/erc721-metadata/subgraph.yaml)
- [Uniswap](https://github.com/messari/subgraphs/blob/master/subgraphs/uniswap-v3-forks/protocols/uniswap-v3/config/templates/uniswapV3Template.yaml),

To become even more of a Graph expert, consider learning about other ways to handle changes in underlying datasources. Alternatives like [Data Source Templates](https://thegraph.com/docs/en/developing/creating-a-subgraph/#data-source-templates) can achieve similar results
To become even more of a Graph expert, consider learning about other ways to handle changes in underlying datasources. Alternatives like [Data Source Templates](/developing/creating-a-subgraph/#data-source-templates) can achieve similar results

> Note: A lot of material from this article was taken from the previously published [Arweave article](/cookbook/arweave/)
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Substreams-powered subgraphs introduce a new `kind` of data source, "substreams"

This data source must specify the indexed network, the Substreams package (`spkg`) as a relative file location, and the module within that Substreams package which produces subgraph-compatible entity changes (in this case `map_entity_changes`, from the Substreams package above). The mapping is specified, but simply identifies the mapping kind ("substreams/graph-entities") and the apiVersion.

> Currently the Subgraph Studio and The Graph Network support Substreams-powered subgraphs which index `mainnet` (Mainnet Ethereum).
> Currently, Subgraph Studio and The Graph Network support Substreams-powered subgraphs which index `mainnet` (Mainnet Ethereum).

```yaml
specVersion: 0.0.4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ After creating an account, navigate to your [dashboard](https://thegraph.com/hos

## Create a Subgraph on the hosted service

Before deploying the subgraph, you need to create it in The Graph Explorer. Go to the [dashboard](https://thegraph.com/hosted-service/dashboard) and click on the _'Add Subgraph'_ button and fill in the information below as appropriate:
Before deploying the subgraph, you need to create it in Graph Explorer. Go to the [dashboard](https://thegraph.com/hosted-service/dashboard) and click on the _Add Subgraph_ button and fill in the information below as appropriate:

**Image** - Select an image to be used as a preview image and thumbnail for the subgraph.

Expand All @@ -30,17 +30,17 @@ Before deploying the subgraph, you need to create it in The Graph Explorer. Go t

**GitHub URL** - Link to the subgraph repository on GitHub.

**Hide** - Switching this on hides the subgraph in the Graph Explorer.
**Hide** - Switching this on hides the subgraph in Graph Explorer.

After saving the new subgraph, you are shown a screen with help on how to install the Graph CLI, how to generate the scaffolding for a new subgraph, and how to deploy your subgraph. The first two steps were covered in the [Creating a Subgraph section](/developing/creating-a-subgraph/).

## Deploy a Subgraph on the hosted service

Deploying your subgraph will upload the subgraph files that you've built with `yarn build` to IPFS and tell the Graph Explorer to start indexing your subgraph using these files.
Deploying your subgraph will upload the subgraph files that you've built with `yarn build` to IPFS and tell Graph Explorer to start indexing your subgraph using these files.

You deploy the subgraph by running `yarn deploy`

After deploying the subgraph, the Graph Explorer will switch to showing the synchronization status of your subgraph. Depending on the amount of data and the number of events that need to be extracted from historical blocks, starting with the genesis block, syncing can take from a few minutes to several hours.
After deploying the subgraph, Graph Explorer will switch to showing the synchronization status of your subgraph. Depending on the amount of data and the number of events that need to be extracted from historical blocks, starting with the genesis block, syncing can take from a few minutes to several hours.

The subgraph status switches to `Synced` once the Graph Node has extracted all data from historical blocks. The Graph Node will continue inspecting blocks for your subgraph as these blocks are mined.

Expand Down
2 changes: 1 addition & 1 deletion website/pages/en/deploying/subgraph-studio-faqs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ Note that you will no longer be able to see or edit the subgraph in Studio once

## 6. How do I find query URLs for subgraphs if I’m not the developer of the subgraph I want to use?

You can find the query URL of each subgraph in the Subgraph Details section of The Graph Explorer. When you click on the “Query” button, you will be directed to a pane wherein you can view the query URL of the subgraph you’re interested in. You can then replace the `<api_key>` placeholder with the API key you wish to leverage in Subgraph Studio.
You can find the query URL of each subgraph in the Subgraph Details section of Graph Explorer. When you click on the “Query” button, you will be directed to a pane wherein you can view the query URL of the subgraph you’re interested in. You can then replace the `<api_key>` placeholder with the API key you wish to leverage in Subgraph Studio.

Remember that you can create an API key and query any subgraph published to the network, even if you build a subgraph yourself. These queries via the new API key, are paid queries as any other on the network.
6 changes: 3 additions & 3 deletions website/pages/en/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="satdwdbvzAQ" />

Remember, while you’re going through your publishing flow, you’ll be able to push to either Arbitrum One or Arbitrum Sepolia. If you’re a first-time subgraph developer, we highly suggest you start with publishing to Arbitrum 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.
Remember, while you’re going through your publishing flow, you’ll be able to push to either Arbitrum One or Arbitrum Sepolia. If you’re a first-time subgraph developer, we highly suggest you start with publishing to Arbitrum Sepolia, which is free to do. This will allow you to see how the subgraph will work in 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 All @@ -76,9 +76,9 @@ Subgraphs with curation signal are shown to Indexers so that they can be indexed

## Versioning your Subgraph with the CLI

Developers might want to update their subgraph, for a variety of reasons. When this is the case, you can deploy a new version of your subgraph to the Studio using the CLI (it will only be private at this point) and if you are happy with it, you can publish this new deployment to The Graph Explorer. This will create a new version of your subgraph that curators can start signaling on and Indexers will be able to index this new version.
Developers might want to update their subgraph, for a variety of reasons. When this is the case, you can deploy a new version of your subgraph to the Studio using the CLI (it will only be private at this point) and if you are happy with it, you can publish this new deployment to Graph Explorer. This will create a new version of your subgraph that curators can start signaling on and Indexers will be able to index this new version.

Up until recently, developers were forced to deploy and publish a new version of their subgraph to the Explorer to update the metadata of their subgraphs. Now, developers can update the metadata of their subgraphs **without having to publish a new version**. Developers can update their subgraph details in the Studio (under the profile picture, name, description, etc) by checking an option called **Update Details** in The Graph Explorer. If this is checked, an on-chain transaction will be generated that updates subgraph details in the Explorer without having to publish a new version with a new deployment.
Up until recently, developers were forced to deploy and publish a new version of their subgraph to the Explorer to update the metadata of their subgraphs. Now, developers can update the metadata of their subgraphs **without having to publish a new version**. Developers can update their subgraph details in the Studio (under the profile picture, name, description, etc) by checking an option called **Update Details** in Graph Explorer. If this is checked, an on-chain transaction will be generated that updates subgraph details in the Explorer without having to publish a new version with a new deployment.

Please note that there are costs associated with publishing a new version of a subgraph to the network. In addition to the transaction fees, developers must also fund a part of the curation tax on the auto-migrating signal. You cannot publish a new version of your subgraph if curators have not signaled on it. For more information on the risks of curation, please read more [here](/network/curating).

Expand Down
8 changes: 4 additions & 4 deletions website/pages/en/developing/creating-a-subgraph.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ yarn global add @graphprotocol/graph-cli
npm install -g @graphprotocol/graph-cli
```

Once installed, the `graph init` command can be used to set up a new subgraph project, either from an existing contract or from an example subgraph. This command can be used to create a subgraph on the Subgraph Studio by passing in `graph init --product subgraph-studio`. If you already have a smart contract deployed to your preferred network, bootstrapping a new subgraph from that contract can be a good way to get started.
Once installed, the `graph init` command can be used to set up a new subgraph project, either from an existing contract or from an example subgraph. This command can be used to create a subgraph in Subgraph Studio by passing in `graph init --product subgraph-studio`. If you already have a smart contract deployed to your preferred network, bootstrapping a new subgraph from that contract can be a good way to get started.

## From An Existing Contract

Expand Down Expand Up @@ -146,9 +146,9 @@ dataSources:

The important entries to update for the manifest are:

- `description`: a human-readable description of what the subgraph is. This description is displayed by the Graph Explorer when the subgraph is deployed to Subgraph Studio.
- `description`: a human-readable description of what the subgraph is. This description is displayed in Graph Explorer when the subgraph is deployed to Subgraph Studio.

- `repository`: the URL of the repository where the subgraph manifest can be found. This is also displayed by The Graph Explorer.
- `repository`: the URL of the repository where the subgraph manifest can be found. This is also displayed in Graph Explorer.

- `features`: a list of all used [feature](#experimental-features) names.

Expand Down Expand Up @@ -600,7 +600,7 @@ import { Gravatar } from '../generated/schema'

> **Note:** The code generation must be performed again after every change to the GraphQL schema or the ABIs included in the manifest. It must also be performed at least once before building or deploying the subgraph.

Code generation does not check your mapping code in `src/mapping.ts`. If you want to check that before trying to deploy your subgraph to the Graph Explorer, you can run `yarn build` and fix any syntax errors that the TypeScript compiler might find.
Code generation does not check your mapping code in `src/mapping.ts`. If you want to check that before trying to deploy your subgraph to Graph Explorer, you can run `yarn build` and fix any syntax errors that the TypeScript compiler might find.

## Data Source Templates

Expand Down
2 changes: 1 addition & 1 deletion website/pages/en/developing/developer-faqs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ The Graph will never charge for the hosted service. The Graph is a decentralized

## 27. How do I update a subgraph on mainnet?

If you’re a subgraph developer, you can deploy a new version of your subgraph to the Subgraph Studio using the CLI. It’ll be private at that point, but if you’re happy with it, you can publish to the decentralized Graph Explorer. This will create a new version of your subgraph that Curators can start signaling on.
If you’re a subgraph developer, you can deploy a new version of your subgraph to Subgraph Studio using the CLI. It’ll be private at that point, but if you’re happy with it, you can publish to the decentralized Graph Explorer. This will create a new version of your subgraph that Curators can start signaling on.

## 28. In what order are the event, block, and call handlers triggered for a data source?

Expand Down
4 changes: 2 additions & 2 deletions website/pages/en/developing/graph-ts/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The `@graphprotocol/graph-ts` library provides the following APIs:

- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values.
- A `store` API to load and save entities from and to the Graph Node store.
- A `log` API to log messages to the Graph Node output and the Graph Explorer.
- A `log` API to log messages to the Graph Node output and Graph Explorer.
- An `ipfs` API to load files from IPFS.
- A `json` API to parse JSON data.
- A `crypto` API to use cryptographic functions.
Expand Down Expand Up @@ -567,7 +567,7 @@ let isContract = ethereum.hasCode(eoa).inner // returns false
import { log } from '@graphprotocol/graph-ts'
```

The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument.
The `log` API allows subgraphs to log information to the Graph Node standard output as well as Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument.

The `log` API includes the following functions:

Expand Down
2 changes: 1 addition & 1 deletion website/pages/en/developing/supported-networks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Subgraphs indexing Gnosis Chain can now be deployed with the `gnosis` network id

For a full list of which features are supported on the decentralized network, see [this page](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md).

Substreams-powered subgraphs indexing `mainnet` Ethereum are supported on the Subgraph Studio and decentralized network.
Substreams-powered subgraphs indexing `mainnet` Ethereum are supported in Subgraph Studio and on the decentralized network.

## Graph Node

Expand Down
6 changes: 3 additions & 3 deletions website/pages/en/network/curating.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Curating
---

Curators are critical to the Graph decentralized economy. They use their knowledge of the web3 ecosystem to assess and signal on the subgraphs that should be indexed by The Graph Network. Through the Explorer, curators are able to view network data to make signaling decisions. The Graph Network rewards curators who signal on good quality subgraphs with a share of the query fees that subgraphs generate. These cues from curators are important for Indexers, who can then process or index the data from these signaled subgraphs.
Curators are critical to the Graph decentralized economy. They use their knowledge of the web3 ecosystem to assess and signal on the subgraphs that should be indexed by The Graph Network. Through Graph Explorer, curators are able to view network data to make signaling decisions. The Graph Network rewards curators who signal on good quality subgraphs with a share of the query fees that subgraphs generate. These cues from curators are important for Indexers, who can then process or index the data from these signaled subgraphs.

When signaling, curators can decide to signal on a specific version of the subgraph or to signal using auto-migrate. When signaling using auto-migrate, a curator’s shares will always be updated to the latest version published by the developer. If you decide to signal on a specific version instead, shares will always stay on this specific version.

Expand All @@ -18,7 +18,7 @@ If you are interested in curating on Ethereum and want to understand the details

## How to Signal

Within the Curator tab on the Graph Explorer, curators will be able to signal and unsignal on certain subgraphs based on network stats. For a step-by-step overview of how to do this in the Explorer, [click here.](/network/explorer)
Within the Curator tab in Graph Explorer, curators will be able to signal and unsignal on certain subgraphs based on network stats. For a step-by-step overview of how to do this in Graph Explorer, [click here.](/network/explorer)

A curator can choose to signal on a specific subgraph version, or they can choose to have their signal automatically migrate to the newest production build of that subgraph. Both are valid strategies and come with their own pros and cons.

Expand Down Expand Up @@ -85,7 +85,7 @@ By signalling on a subgraph, you will earn a share of all the query fees that th
Finding high-quality subgraphs is a complex task, but it can be approached in many different ways. As a Curator, you want to look for trustworthy subgraphs that are driving query volume. A trustworthy subgraph may be valuable if it is complete, accurate, and supports a dApp’s data needs. A poorly architected subgraph might need to be revised or re-published, and can also end up failing. It is critical for Curators to review a subgraph’s architecture or code in order to assess if a subgraph is valuable. As a result:

- Curators can use their understanding of a network to try and predict how an individual subgraph may generate a higher or lower query volume in the future
- Curators should also understand the metrics that are available through The Graph Explorer. Metrics like past query volume and who the subgraph developer is can help determine whether or not a subgraph is worth signalling on.
- Curators should also understand the metrics that are available through Graph Explorer. Metrics like past query volume and who the subgraph developer is can help determine whether or not a subgraph is worth signalling on.

### 3. What’s the cost of updating a subgraph?

Expand Down
Loading
Loading