hack-a-chain-software / indexer-kadena

0 stars 0 forks source link

[Kdascan] Front integrations #11

Closed 1Mateus closed 1 month ago

1Mateus commented 3 months ago

Development

1Mateus commented 1 month ago

Todo:

1Mateus commented 1 month ago

Query should return the contract, but not:

query GetTransactionById {
  transactionByRequestKey(
    requestkey: "KqKwI9mN9lTWp-bl-OJRAiglHgaHRl8aY54Gr-Yu6R8"
    transferLimit: 20
    eventLimit: 20
  ) {
    transfers {
      amount
      chainId
      contractId
      contractByContractId {
        metadata
      }
    }
  }
}

returns:

{
  "data": {
    "transactionByRequestKey": {
      "transfers": [
        {
          "amount": "0.00001894",
          "chainId": 8,
          "contractId": null,
          "contractByContractId": null
        },
        {
          "amount": "1",
          "chainId": 8,
          "contractId": 268,
          "contractByContractId": null
        }
      ]
    }
  }
}
1Mateus commented 1 month ago

I need to be able to filter the balance table by the Account column and also be able to filter the table to show only the items that are NFTs. If I can't do this, I won't be able to generate a valid pagination.

query GetNFTBalancesByAccount {
  allBalances(condition: {hasTokenId: true}) {
    nodes {
      qualname
      tokenId
      hasTokenId
    }
  }
}

The current hasTokenId returns all the data within contract, which is not incorrect. However, if I can't filter for items that are NFT contracts, I won't be able to generate consistent pagination, as there will be mixed data from NFTs and Tokens on each page.