Skip to content

rainlanguage/orderbook-subgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

161 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Testing subgraph

  • nix-shell --run init
  • nix-shell --run docker-up
  • nix-shell --run ci-test

Deploying the subgraph with registry subgraph ABI check

  • nix-shell --run init
  •   nix-shell --run "ts-node scripts/deploy.ts \
      --contractAddress <CONTRACT_ADDRESS> \
      --subgraphName <SUBGRAPH_NAME> \
      --graphAccessToken <GRAPH_ACCESS_TOKEN> \
      --network <NETWORK>
      "
    

Deploying the subgraph with etherscan/polygonscan ABI check

  • nix-shell --run init
  •   nix-shell --run "ts-node scripts/deploy.ts \
      --contractAddress <CONTRACT_ADDRESS> \
      --subgraphName <SUBGRAPH_NAME> \
      --graphAccessToken <GRAPH_ACCESS_TOKEN> \
      --network <NETWORK>
      --blockNumber <BLOCK_NUMBER>
      --etherscanAPIKey <API_KEY>
      "
    

To deploy subgraph without any ABI check

  • nix-shell --run init
  •   nix-shell --run "ts-node scripts/deploy.ts \
      --contractAddress <CONTRACT_ADDRESS> \
      --blockNumber <BLOCK_NUMBER>
      --subgraphName <SUBGRAPH_NAME> \
      --graphAccessToken <GRAPH_ACCESS_TOKEN> \
      --network <NETWORK>
      --skipCheck
      "
    

Building a Subgraph to be deployed by Chainstack

When deploying with chainstack we only need to build the sugbraph. This can be done by using any of the following commands.

Build Subgraph with registry subgraph ABI check

Run :

nix-shell --run init

and then :

nix-shell --run "ts-node scripts/buildChainstackSubgraph.ts \
  --contractAddress <CONTRACT_ADDRESS> \
  --network <NETWORK>
  "

Build Subgraph with etherscan/polygonscan ABI check

This is the recommended command while building the subgraph. Run :

nix-shell --run init

and then :

nix-shell --run "ts-node scripts/buildChainstackSubgraph.ts \
  --contractAddress <CONTRACT_ADDRESS> \
  --network <NETWORK>
  --blockNumber <BLOCK_NUMBER>
  --etherscanAPIKey <API_KEY>
  "

Build Subgraph without any ABI check

Run :

nix-shell --run init

and then :

nix-shell --run "ts-node scripts/buildChainstackSubgraph.ts \
  --contractAddress <CONTRACT_ADDRESS> \
  --blockNumber <BLOCK_NUMBER>
  --network <NETWORK>
  --skipCheck
  "

Deploying Subgraph with Chainstack

  • After building the subgraph to deploy subgraph , create a subgraph on https://chainstack.com/ and simply run the Deployment command generated by the chainstack console from the root of the project :
  • The deployment command will look something like this :
graph deploy --node <chainstack-endpoint-url> --ipfs <chainstack-ipfs-url> <chainstack-subgraph-name>

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors