How to use
Basically, you can deploy as same way with TheGraph. 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.
First, deploy contract at cypress or baobab.
Because
graph-clidoesn't support Klaytn, we can't fetch information from deployed contract withgraph init.Create a directory, and move into it. Create a file and save the ABI.
Initialize project with
graph init --product hosted-service --protocol ethereum --index-events --from-contract <CONTRACT_ADDRESS> --abi <FILE_PATH> <PROJECT_NAME/SUBGRAPH_NAME>.Modify created
subgraph.yaml.Change
dataSources.networkvalue intocypressorbaobab.Change
dataSources.source.startBlockinto the deployed block number. If there is no field, add one.
Modify
scriptsat createdpackage.json.Add or modify
"create-graph": "graph create --node https://klaytn-node.graph.scv.sh/deploy <PROJECT_NAME/SUBGRAPH_NAME> --access-token <ACCESS_TOKEN>".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>".
Last updated