Skip to content

edgeandnode/local-network

Repository files navigation

local-network

a local Graph network for debugging & integration tests

setup

  1. install Docker & Docker Compose
  2. docker compose down && docker compose up --build

useful commands

  • docker compose up --build -d ${service}
  • docker logs -f ${service}
  • docker system prune
  • source .env

chain

ipfs

  • cat file via curl:
    curl -X POST "http://localhost:5001/api/v0/cat?arg=f1220d6b169dcf83bfe0f615baa2d83e9adf77d520b52faf18a759eb7277b6d66fa7f"
  • cat file via CLI:
    ipfs --api=/ip4/127.0.0.1/tcp/5001 cat QmagRyTMp4qcRb8fJufk7urNwCQmmUEB9mC6nxHQuKwydb
  • note: if you have a hex digest, a valid CID for it is the hex digits prefixed by f1220. For example, 0xd6b169dcf83bfe0f615baa2d83e9adf77d520b52faf18a759eb7277b6d66fa7f -> f1220d6b169dcf83bfe0f615baa2d83e9adf77d520b52faf18a759eb7277b6d66fa7f

postgres

  • psql -h localhost -U postgres

graph-node

graph-contracts

block-oracle

indexer-agent

  • graph indexer connect http://localhost:7600
  • graph indexer --network=hardhat status

gateway

curl "http://localhost:7700/api/subgraphs/id/BFr2mx7FgkJ36Y6pE5BiXs1KmNUmVDCnL82KUSdcLW1g" \
  -H 'content-type: application/json' -H "Authorization: Bearer deadbeefdeadbeefdeadbeefdeadbeef" \
  -d '{"query": "{ _meta { block { number } } }"}'

redpanda

docker exec -it redpanda rpk topic consume gateway_client_query_results --brokers="localhost:9092"

tap-contracts

indxexer-service-rs

setup:

  • indexer-agent/run.sh:
    • export INDEXER_AGENT_PUBLIC_INDEXER_URL="http://indexer-service-rs:${INDEXER_SERVICE_RS}"
  • docker compose up --build -d indexer-agent
  • cast rpc evm_mine (potentially necessary to update registration URL on-chain)

About

A local graph network for integration testing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published