Based on SubQuery project defines for collect the crowdloan data from Heiko or Parallel Substrate blockchain
yarn
make launch
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.
{
query {
ledgers(first: 5) {
nodes {
id
assetId
blockHeight
total
}
}
metadata(first: 5) {
nodes {
id
stakingAssetId
liquidAssetId
blockHash
}
}
}
}
Staking & Farming Positions
{
query {
stakingPositions(
orderBy: BLOCK_HEIGHT_ASC
first: 100
filter: {
id: { equalTo: "hJKzPoi3MQnSLvbShxeDmzbtHncrMXe5zwS3Wa36P6kXeNpcv" }
}
) {
nodes {
id
totalStaked
totalEarned
lending
farming
avgExchangeRate
balance
blockHeight
}
}
farmingPositions(
orderBy: BLOCK_HEIGHT_ASC
first: 100
filter: {
id: { equalTo: "hJKzPoi3MQnSLvbShxeDmzbtHncrMXe5zwS3Wa36P6kXeNpcv" }
}
) {
nodes {
id
accrued
claimed
blockHeight
}
}
}
}
We used IPFS deployment from subQuery team provide.
Before do the deployment, make sure run yarn build
successfully. And please check if the genesisHash in yaml file is correct for the blockchain you want to collect.
Need to prepare your SUBQL_ACCESS_TOKEN before call actions.
Run workflow
on Deploy with Parallel RPC action, and enter the SUBQL_ACCESS_TOKEN
, then click the button again.The check the response in deployment action Publish to IPFS
step, for example, there should be as following:
Building and packing code... done
Uploading SupQuery project to IPFS
SubQuery Project uploaded to IPFS: <CID>
Use CID
for next step.
CID
Go To subQuery project page, click Deploy button for staging slot and enter the CID you previously get. After staging finished deployment and everything looks good. Click Promote to production
deploy the changes to production slot.