public-awesome / cw-nfts

Examples and helpers to build NFT contracts on CosmWasm
Apache License 2.0
185 stars 181 forks source link

When querying for user's tokens IDs, default and max values are low #87

Closed mikedotexe closed 2 months ago

mikedotexe commented 1 year ago

The default and maximum value when returning token information seems to be shared with these consts here: https://github.com/CosmWasm/cw-nfts/blob/27ffdc6c24c2d173be6c677d04bec1420191184d/contracts/cw721-base/src/query.rs#L17-L18

These may be quite low for certain use cases.

If you query tokens you will get something like this:

nftInfo {
  tokens: [
    '489', '491', '492',
    '494', '495', '496',
    '497', '498', '499',
    '500'
  ]
}

You must pass in the parameters start_after or limit in order to increase this, where the limit is maxed out at 100.

I feel like both the default and maximum could be increased for queries that return only token IDs.

This might involve separating different constants for various queries that may return larger payloads than just the ID.

taitruong commented 2 months ago

I cant recall PR, but max limit is now set to 1000.