GitXplorerGitXplorer
v

PolkadotIndexer

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
322fe0916f4c11ddbcebcce94fb3b97c7f763c43

ChildBounties aggregation add

committed 2 years ago
Unverified
434b138542fe739b7e0b2c6433f5d2e61cc2d23a

readme fix

committed 2 years ago
Unverified
883f57d80614c2fa3745df4f429a5ae09fb97e09

add accumulated reward AccountGain

committed 2 years ago
Unverified
2f85d031aae601ca58f43a2cccc08d9168a5e1e4

Reward listener prettified

committed 2 years ago
Unverified
055537e15c89a95224aeb6193665a7555c0f1aba

subql-starter with small changes(add Reward listener)

committed 2 years ago

README

The README file for this repository.

SubQuery - PolkadotIndexer

Here I will index some interesting stuff in order to study Subquery.

Building

yarn install
yarn codegen
yarn build

Indexing and Query

Run required systems in docker

docker-compose pull && docker-compose up

Query the project

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.

For the subql-starter project, you can try to query with the following code to get a taste of how it works.

Reward payouts for each account

rewards sorted by payout

{
  query {
  	rewardPayouts(first: 10, orderBy: HOW_MUCH_DESC) {
      nodes {
        id,
        who,
        howMuch,
      }
    }
  }
}

rewards for some account

{
  query {
  	rewardPayouts(first: 10, filter: {who: {equalTo: "13SkL2uACPqBzpKBh3d2n5msYNFB2QapA5vEDeKeLjG2LS3Y"}}) {
      nodes {
        id,
        who,
        howMuch,
      }
    }
  }
}
Rewards accumulated for each account
{
  query {
  	accountGains(first: 10, orderBy: HOW_MUCH_DESC) {
      nodes {
        id,
        howMuch,
        lastSync
      }
    }
  }
}
Child Bounties (base bounties are not interesting)
{
  query {
  	childBounties(first: 10) {
      nodes {
        id,
        claimedBy,
        reward
      }
    }
  }
}