Skip to content

pinax-network/eosio.token-subgraph

Repository files navigation

EOS token transfer subgraph

This is a basic substreams-based subgraph built on eosio.token substreams

Prerequisites

  1. Docker
  2. SUBSTREAMS_API_TOKEN env variable set

Quick start

  1. Start graph-node, ipfs, postgres and pgweb containers
> cd graph-node
> SUBSTREAMS_ENDPOINT=https://eos.substreams.pinax.network:443 ./up.sh -c

Make sure they start without errors. You should see messages like this in the log as a sign that graph node started successfully and is tracking network head block:

graph-node-token  | Jan 30 22:07:43.128 INFO Substreams backend graph_out last block is 354915877, 0 stages, 0 jobs, trace_id: f874d9b35da403c1ca7797db77b1160c, provider: substreams-mainnet,
  1. In another terminal window, build, create and deploy the subgraph:
> yarn install
> yarn build
> yarn create-local
> yarn deploy-local

Once you see messages like this in the docker terminal, it means graph node is consuming the data from substreams backend:

graph-node-token  | Jan 30 22:12:20.870 INFO Applying 2 entity operation(s), block_hash: 0x30303030303163613266303662306265636462323138323339616135373461653237653865326462383663643562633637623830333039643966306639616438, block_number: 458, sgd: 1, subgraph_id: QmempVDyiT6sr1R4A8uFjtYp833fqg33f9RTAyutT3zwgK, component: SubgraphInstanceManager
  1. Open http://127.0.0.1:8000/subgraphs/name/eosiotoken in the browser and try running a query, i.e.
query{
  transfers{
    from
    to
    quantity
    memo
    trx_id
  }
}

You may need to wait a couple of minutes until the first batch of transfers is written into the database

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages