> For the complete documentation index, see [llms.txt](https://scvsoft.gitbook.io/chaingraph/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scvsoft.gitbook.io/chaingraph/how-to-use.md).

# How to use

Basically, you can deploy as same way with [TheGraph](https://thegraph.com/docs/en/developing/creating-a-subgraph/). Read this link if you want to get more information.

ChainGraph supports Klaytn network, but tool like `graph-cli` doesn't support yet. So, please follow this procedures.

1. First, deploy contract at cypress or baobab.
2. Because `graph-cli` doesn't support Klaytn, we can't [fetch information from deployed contract](https://thegraph.com/docs/en/developing/creating-a-subgraph/#from-an-existing-contract) with `graph init`.
   1. Create a directory, and move into it. Create a file and save the ABI.
   2. Initialize project with `graph init --product hosted-service --protocol ethereum --index-events --from-contract <CONTRACT_ADDRESS> --abi <FILE_PATH> <PROJECT_NAME/SUBGRAPH_NAME>`.
   3. Modify created `subgraph.yaml`.
      1. Change `dataSources.network` value into `cypress` or `baobab`.
      2. Change `dataSources.source.startBlock` into the deployed block number. If there is no field, add one.
   4. Modify `scripts` at created `package.json`.
      1. Add or modify `"create-graph": "graph create --node https://klaytn-node.graph.scv.sh/deploy <PROJECT_NAME/SUBGRAPH_NAME> --access-token <ACCESS_TOKEN>"`.
      2. Add or modify `"deploy": "graph deploy --ipfs https://ipfs.graph.scv.sh --node https://klaytn-node.graph.scv.sh/deploy <PROJECT_NAME/SUBGRAPH_NAME> --deploy-key <ACCESS_TOKEN>"`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://scvsoft.gitbook.io/chaingraph/how-to-use.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
