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

chore: update readme with chainstack instructions #48

Merged
merged 1 commit into from
Aug 26, 2024
Merged
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
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,49 @@ Test the following GraphQL request to ensure everything works well
}
```

## Run on chainstack dedicated subgraph

After you create an account on [chainstack](https://chainstack.com/), you can deploy this subgraph on their platform.

### 1. Install the graph cli and prepare the environment

```
yarn global add @graphprotocol/graph-cli
yarn
graph codegen subgraph.testnet_fast.yaml # or subgraph.mainnet_fast.yaml
```

### 2. Create a new project

You'll need to create a new project on chainstack to contain the subgraph.

### 3. Create a new subgraph

Then go into `Subgraphs` > `Add Subgraph` > `Dedicated Subgraph`
Select Ethereum and chose the network you want to deploy on. (Mainnet or Holesky)
Then `Deploy Subgraph`

### 4. Deploy the subgraph

Copy the `Deployment command` and append the `subgraph.mainnet_fast.yaml` or `subgraph.testnet_fast.yaml` to the command according to the network you want to deploy on.

```

`graph deploy --node https://api.graph-ams.p2pify.com/.../deploy --ipfs https://api.graph-ams.p2pify.com/.../ipfs sgr-190-148-475 subgraph.mainnet_fast.yaml
`
```
### 5. Test the GraphQL request

Wait for the indexing to happen and test the following GraphQL request in the webUI (next to the indexing bar)
```
{
nexuses {
factories {
address
pools {
address
}
}
}
}
```
Loading