zeitgeistpm / zeitgeist-subsquid

Zeitgeist chain block indexer and processor that provides data sets for powerful GraphQL queries.
7 stars 4 forks source link

Add XCM transfer query #491

Open Chralt98 opened 5 months ago

Chralt98 commented 5 months ago

It's currently complicated to filter the historicalAccountBalances for xcm transfers. I would expect to query historicalXcmTransfers. You can index the TransferredMultiAssets event from here (orml-xtokens pallet). Here is the reference to the subscan information. I would want to know from which account the XCM transfer originated, what the destination account is, what parachain it goes to, how much and which assets are involved etc (the more information the better)..

saboonikhil commented 5 months ago

What do you think about this?

query MyQuery {
  historicalAccountBalances(
    limit: 10
    where: { extrinsic: { name_containsInsensitive: "xtokens" } }
  ) {
    accountId
    assetId
    blockNumber
    dBalance
    event
    timestamp
  }
}