Skip to content

Commit

Permalink
Merge pull request #144 from kaiachain/feat/graph_update_baseurls
Browse files Browse the repository at this point in the history
Updated Graph image urls & bug fixes
  • Loading branch information
praveen-kaia authored Oct 28, 2024
2 parents 9169644 + bdc88de commit 70acd8e
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 15 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@ This website is built using Docusaurus v3.
### Installation

```
$ yarn
$ npm i
```

### Local Development

```
$ yarn start
$ npm start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
$ npm run build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.
Expand All @@ -69,13 +69,13 @@ This command generates static content into the `build` directory and can be serv
Using SSH:

```
$ USE_SSH=true yarn deploy
$ USE_SSH=true npm run deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
$ GIT_USER=<Your GitHub username> npm run deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
18 changes: 9 additions & 9 deletions docs/build/tools/indexers/thegraph.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ Here’s a step by step walk through:

Go to the [Subgraph Studio](https://thegraph.com/studio/) and connect your wallet. Once your wallet is connected, you can begin by clicking “Create a Subgraph”. When choosing a name, it is recommended to use Title Case: “Subgraph Name Chain Name.”

![Create a Subgraph](https://lh7-us.googleusercontent.com/docsz/AD_4nXf8OTdwMxlKQGKzIF_kYR7NPKeh9TmWnZBYxb7ft_YbdOdx_VVtbp6PslN7N1KGUzNpIDCmaXppdrllM1cw_J4L8Na03BXOWzJTK1POCve0nkRjQYgWJ60QHAdtQ4Niy83SMM8m0F0f-N-AJj4PDqDPlA5M?key=fnI6SyFgXU9SZRNX5C5vPQ)
![Create a Subgraph](/img/build/tools/graph/01-create-subgraph.png)


You will then land on your subgraph’s page. All the CLI commands you need will be visible on the right side of the page:

![CLI commands](https://github.com/alinobrasil/the_graph_getting_started/raw/refs/heads/kaia/img/studio-cli-commands.webp)
![CLI commands](/img/build/tools/graph/02-cli-commands.webp)


### Install the Graph CLI⁠
Expand All @@ -51,18 +51,18 @@ graph init --studio <SUBGRAPH_SLUG>
```
You’ll be prompted to provide some info on your subgraph like this:

![cli sample](https://github.com/alinobrasil/the_graph_getting_started/raw/refs/heads/kaia/img/cli-output.webp)
![CLI sample](/img/build/tools/graph/03-cli-sample.webp)


After entering the contract info, the graph-cli will attempt to fetch ABI, StartBLock & Contract name from the blockexplorer API.

However, KaiaScan's API is not ready yet, so when asked to retry, just say "no". Here's how to obtain these manually:

1. ABI: You need to prepare a json file containing the ABI in the same directory where you're running `graph init`. From the [contract's page on Kaiascan](https://kaiascan.io/address/0x5096db80b21ef45230c9e423c373f1fc9c0198dd), go to the `Contract` tab, click `View Code` and you'll be able to copy the ABI. Save it as a json file in the same folder where you're running `graph init`. In this screenshot above, it was saved as `abi.json`.
![Finding ABI](https://github.com/alinobrasil/the_graph_getting_started/raw/refs/heads/kaia/img/kaiascan-abi.webp)
![Finding ABI](/img/build/tools/graph/04-kaiascan-abi.webp)

2. Start Block: Click into the transaction hash where the contract was created. There you'll find the block where the contract was created.
![contract creation](https://github.com/alinobrasil/the_graph_getting_started/raw/refs/heads/kaia/img/kaiascan-contract-creation.webp)
![contract creation](/img/build/tools/graph/05-contract-creation.webp)

3. Contract Name: Just type in the name of the contract. If this is the only contract you're indexing in this subgraph, it's OK to just go with the default `Contract`.

Expand Down Expand Up @@ -90,14 +90,14 @@ You will be asked for a version label. You can enter something like v0.0.1, but

You can test your subgraph by making a sample query in the playground section. The Details tab will show you an API endpoint. You can use that endpoint to test from your dapp.

![Playground](https://lh7-us.googleusercontent.com/docsz/AD_4nXf3afwSins8_eO7BceGPN79VvwolDxmFNUnkPk0zAJCaUA-3-UAAjVvrMzwr7q9vNYWdrEUNgm2De2VfQpWauiT87RkFc-cVfoPSsQbYSgsmwhyY1-tpPdv2J1H4JAMq70nfWBhb8PszZBFjsbDAaJ5eto?key=fnI6SyFgXU9SZRNX5C5vPQ)
![Playground](/img/build/tools/graph/06-playground.png)


### Publish Your Subgraph to The Graph’s Decentralized Network

Once your subgraph is ready to be put into production, you can publish it to the decentralized network. On your subgraph’s page in Subgraph Studio, click on the Publish button:

![publish button](https://github.com/alinobrasil/the_graph_getting_started/raw/refs/heads/kaia/img/studio-publish-subgraph.webp)
![publish button](/img/build/tools/graph/07-studio-publish-subgraph.webp)

> **Note:**
> - Kaia shows as "partially supported" for now because a final on-chain voting process to unlock rewards for indexers has not been completed yet. For now, Edge & Node's Indexer (Upgrade Indexer) will be the only indexer supporting all Kaia subgraphs.
Expand All @@ -111,7 +111,7 @@ For any subgraph on the decentralized network, you can start querying it by pass

Here’s an example from the [CryptoPunks Ethereum subgraph](https://thegraph.com/explorer/subgraphs/HdVdERFUe8h61vm2fDyycHgxjsde5PbB832NHgJfZNqK) by Messari:

![Query URL](https://lh7-us.googleusercontent.com/docsz/AD_4nXebivsPOUjPHAa3UVtvxoYTFXaGBao9pQOAJvFK0S7Uv0scfL6TcTVjmNCzT4DgsIloAQyrPTCqHjFPtmjyrzoKkfSeV28FjS32F9-aJJm0ILAHey2gqMr7Seu4IqPz2d__QotsWG3OKv2dEghiD74eypzs?key=fnI6SyFgXU9SZRNX5C5vPQ)
![Query URL](/img/build/tools/graph/08-query-url.png)


The query URL for this subgraph is:
Expand All @@ -122,7 +122,7 @@ Now, you simply need to  fill in your own API Key to start sending GraphQL quer

### Getting your own API Key

![API keys](https://lh7-us.googleusercontent.com/docsz/AD_4nXdz7H8hSRf2XqrU0jN3p3KbmuptHvQJbhRHOJh67nBfwh8RVnhTsCFDGA_JQUFizyMn7psQO0Vgk6Vy7cKYH47OyTq5PqycB0xxLyF4kSPsT7hYdMv2MEzAo433sJT6VlQbUAzgPnSxKI9a5Tn3ShSzaxI?key=fnI6SyFgXU9SZRNX5C5vPQ)
![API keys](/img/build/tools/graph/09-apikeys.png)


In Subgraph Studio, you’ll see the “API Keys” menu at the top of the page. Here you can create API Keys.
Expand Down
1 change: 0 additions & 1 deletion docs/references/public-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ All That Node aims to become trusty gateway to Web3 infrastructure allowing buil

#### Features

- 50,000 Requests Per Day with Free Tier
- Public Nodes & Faucets for the Ecosystem
- Pay-As-You-Go-plan supported if you need more
- Dedicated Nodes
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added static/img/build/tools/graph/03-cli-sample.webp
Binary file not shown.
Binary file added static/img/build/tools/graph/04-kaiascan-abi.webp
Binary file not shown.
Binary file not shown.
Binary file added static/img/build/tools/graph/06-playground.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 not shown.
Binary file added static/img/build/tools/graph/08-query-url.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 static/img/build/tools/graph/09-apikeys.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 70acd8e

Please sign in to comment.