-
Notifications
You must be signed in to change notification settings - Fork 155
Sunbeam updates #629
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
Sunbeam updates #629
Changes from all commits
d5ed926
c4e52bc
3d25004
94fb990
3cd334f
f011b91
6882733
5ca753b
dcfb619
bb58df5
1382892
b039a55
d54e4db
0c29e79
037a769
145c3ad
fb30f2a
9e7cf78
d5429af
a4ecbad
ca8212c
252dadc
537b28a
a6be22e
5880f0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
title: Building Subgraphs on Arweave | ||
--- | ||
|
||
> Arweave support in Graph Node and on the hosted service is in beta: please reach us on [Discord](https://discord.gg/graphprotocol) with any questions about building Arweave subgraphs! | ||
> Arweave support in Graph Node and on the Subgraph Studio is in beta: please reach us on [Discord](https://discord.gg/graphprotocol) with any questions about building Arweave subgraphs! | ||
|
||
In this guide, you will learn how to build and deploy Subgraphs to index the Arweave blockchain. | ||
|
||
|
@@ -83,7 +83,7 @@ dataSources: | |
``` | ||
|
||
- Arweave subgraphs introduce a new kind of data source (`arweave`) | ||
- The network should correspond to a network on the hosting Graph Node. On the hosted service, Arweave's mainnet is `arweave-mainnet` | ||
- The network should correspond to a network on the hosting Graph Node. in Subgraph Studio, Arweave's mainnet is `arweave-mainnet` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "in Subgraph Studio" should be capitalized. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @MichaelMacaulay – When finding & replacing, "match case" is your friend. :P |
||
- Arweave data sources introduce an optional source.owner field, which is the public key of an Arweave wallet | ||
|
||
Arweave data sources support two types of handlers: | ||
|
@@ -150,12 +150,12 @@ Block handlers receive a `Block`, while transactions receive a `Transaction`. | |
|
||
Writing the mappings of an Arweave Subgraph is very similar to writing the mappings of an Ethereum Subgraph. For more information, click [here](/developing/creating-a-subgraph/#writing-mappings). | ||
|
||
## Deploying an Arweave Subgraph on the hosted service | ||
## Deploying an Arweave Subgraph in Subgraph Studio | ||
|
||
Once your subgraph has been created on the hosted service dashboard, you can deploy by using the `graph deploy` CLI command. | ||
Once your subgraph has been created on your Subgraph Studio dashboard, you can deploy by using the `graph deploy` CLI command. | ||
|
||
```bash | ||
graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token <your-access-token> | ||
graph deploy --studio --access-token <your-access-token> | ||
``` | ||
|
||
## Querying an Arweave Subgraph | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,6 @@ | |
title: Building Subgraphs on NEAR | ||
--- | ||
|
||
> NEAR support in Graph Node and on the Hosted Service is in beta: please contact [email protected] with any questions about building NEAR subgraphs! | ||
|
||
This guide is an introduction to building subgraphs indexing smart contracts on the [NEAR blockchain](https://docs.near.org/). | ||
|
||
## What is NEAR? | ||
|
@@ -73,7 +71,7 @@ dataSources: | |
``` | ||
|
||
- NEAR subgraphs introduce a new `kind` of data source (`near`) | ||
- The `network` should correspond to a network on the hosting Graph Node. On the Hosted Service, NEAR's mainnet is `near-mainnet`, and NEAR's testnet is `near-testnet` | ||
- The `network` should correspond to a network on the hosting Graph Node. On Subgraph Studio, NEAR's mainnet is `near-mainnet`, and NEAR's testnet is `near-testnet` | ||
- NEAR data sources introduce an optional `source.account` field, which is a human-readable ID corresponding to a [NEAR account](https://docs.near.org/docs/concepts/account). This can be an account or a sub-account. | ||
- NEAR data sources introduce an alternative optional `source.accounts` field, which contains optional suffixes and prefixes. At least prefix or suffix must be specified, they will match the any account starting or ending with the list of values respectively. The example below would match: `[app|good].*[morning.near|morning.testnet]`. If only a list of prefixes or suffixes is necessary the other field can be omitted. | ||
|
||
|
@@ -175,34 +173,35 @@ This includes a new JSON parsing function - logs on NEAR are frequently emitted | |
|
||
Once you have a built subgraph, it is time to deploy it to Graph Node for indexing. NEAR subgraphs can be deployed to any Graph Node `>=v0.26.x` (this version has not yet been tagged & released). | ||
|
||
The Graph's Hosted Service currently supports indexing NEAR mainnet and testnet in beta, with the following network names: | ||
Subgraph Studio and the upgrade Indexer on The Graph Network currently supports indexing NEAR mainnet and testnet in beta, with the following network names: | ||
|
||
- `near-mainnet` | ||
- `near-testnet` | ||
|
||
More information on creating and deploying subgraphs on the Hosted Service can be found [here](/deploying/deploying-a-subgraph-to-hosted). | ||
More information on creating and deploying subgraphs on Subgraph Studio can be found [here](/deploying/deploying-a-subgraph-to-studio). | ||
|
||
As a quick primer - the first step is to "create" your subgraph - this only needs to be done once. On the Hosted Service, this can be done from [your Dashboard](https://thegraph.com/hosted-service/dashboard): "Add Subgraph". | ||
As a quick primer - the first step is to "create" your subgraph - this only needs to be done once. On Subgraph Studio, this can be done from [your Dashboard](https://thegraph.com/studio/): "Create a subgraph". | ||
|
||
Once your subgraph has been created, you can deploy your subgraph by using the `graph deploy` CLI command: | ||
|
||
```sh | ||
$ graph create --node <graph-node-url> subgraph/name # creates a subgraph on a local Graph Node (on the Hosted Service, this is done via the UI) | ||
$ graph deploy --node <graph-node-url> --ipfs https://api.thegraph.com/ipfs/ # uploads the build files to a specified IPFS endpoint, and then deploys the subgraph to a specified Graph Node based on the manifest IPFS hash | ||
$ graph create --node <graph-node-url> <subgraph-name> # creates a subgraph on a local Graph Node (on Subgraph Studio, this is done via the UI) | ||
$ graph deploy --node <graph-node-url> --ipfs https://api.thegraph.com/ipfs/ <subgraph-name> # uploads the build files to a specified IPFS endpoint, and then deploys the subgraph to a specified Graph Node based on the manifest IPFS hash | ||
``` | ||
|
||
The node configuration will depend on where the subgraph is being deployed. | ||
|
||
### Hosted Service | ||
### Subgraph Studio | ||
|
||
```sh | ||
graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token <your-access-token> | ||
graph auth --studio | ||
graph deploy --studio <subgraph-name> | ||
``` | ||
|
||
### Local Graph Node (based on default configuration) | ||
|
||
```sh | ||
graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 | ||
graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 <subgraph-name> | ||
``` | ||
|
||
Once your subgraph has been deployed, it will be indexed by Graph Node. You can check its progress by querying the subgraph itself: | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we say "the" Subgraph Studio or just on (or in?) Subgraph Studio?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think maybe just "in", good call