stwiname / perpdex-subquery

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

perpdex-subquery

This repository contains the SubQuery project for PerpDEX.

Local Development

Environment

  • Typescript are required to compile project and define types.

  • Both SubQuery CLI and generated Project have dependencies and require Node.

Install the SubQuery CLI

Install SubQuery CLI globally on your terminal by using NPM:

npm install -g @subql/cli

Run help to see available commands and usage provide by CLI

subql help

Build and Run

yarn install
source run_local.sh

Query

Open your browser and head to http://localhost:3000.

Finally, you should see a GraphQL playground is showing in the explorer and the schemas that ready to query.

The following is an example of querying entity Deposited.

query {
  depositeds {
    nodes {
      id
      trader
      amount
      blockNumberLogIndex
      blockNumber
      timestamp
    }
  }
}

Contribution

Please see CONTRIBUTING.md

Related Projects

About

License:Creative Commons Zero v1.0 Universal


Languages

Language:TypeScript 96.3%Language:JavaScript 3.1%Language:Shell 0.6%