GithubHelp home page GithubHelp logo

metis-subgraph-node's Introduction

ERC20/ERC721 Token Approvals

Start graph-node

docker-compose up -d

ipfs webui: http://127.0.0.1:5001 graph index node playground: http://127.0.0.1:8030/graphql/playground

Build subgraph

yarn build

Create subgraph

yarn create-local

Deploy subgraph

yarn deploy-local

Subgraph graphql playground

http://localhost:8000/subgraphs/name/metisio/approvals/graphql

query {
  tokens(subgraphError: deny, first: 100) {
    id
    symbol
    type
  }
}
{
  "data": {
    "tokens": [
      {
        "id": "0x034d0732c70c1b5e8dd8e2b8b9221a1744681280",
        "symbol": "GLP:WMETIS-GIVE",
        "type": "ERC20"
      },
      {
        "id": "0x75cb093e4d61d2a2e65d8e0bbb01de8d89b53481",
        "symbol": "WMETIS",
        "type": "ERC20"
      },
      {
        "id": "0x8667566d080abce4934d9c6c5c1fd720aceb3f60",
        "symbol": "MetaCraftItem",
        "type": "ERC721"
      },
      {
        "id": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000",
        "symbol": "Metis",
        "type": "ERC20"
      },
      {
        "id": "0xfe3f3a1f5b91eeb9c85255a71f3d1a99f01ec3ec",
        "symbol": "GIVE",
        "type": "ERC20"
      }
    ]
  }
}

Get subgraph status

Open graph index node playground and input flowing graphl request

{
  indexingStatusForCurrentVersion(subgraphName: "metisio/approvals") {
    synced
    health
    fatalError {
      message
      block {
        number
        hash
      }
      handler
    }
    chains {
      chainHeadBlock {
        number
      }
      latestBlock {
        number
      }
    }
  }
}
{
  "data": {
    "indexingStatusForCurrentVersion": {
      "chains": [
        {
          "chainHeadBlock": {
            "number": "1924116"
          },
          "latestBlock": {
            "number": "10146"
          }
        }
      ],
      "fatalError": null,
      "health": "healthy",
      "synced": false
    }
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.