Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: query nft denoms #194

Open
taitruong opened this issue Mar 2, 2023 · 4 comments
Open

BUG: query nft denoms #194

taitruong opened this issue Mar 2, 2023 · 4 comments

Comments

@taitruong
Copy link
Contributor

Summary of Bug

Not all denoms are shown. Problem is either in CLI/client or nft module.

Environment

  • OS: Ubuntu 22.04
  • Software version: iris version 1.4.1-gon-testnet

Steps to Reproduce

This query tells me there are 100 collections:

$ iris query nft denoms --page 0 | grep "id:" | wc -l
100 # 100 collections found

Now create a new collection:

$ iris tx nft issue arkprotocol004 --symbol "arkprotocol_symbol" --name "Ark Protocol - building multichain utilities" --uri "https://arkprotocol.io" --mint-restricted=true --update-restricted=true --from iaa183e7ccwsnngj2q8lfxnmekunspnfxs6qxd4v3f --fees 2000uiris -b sync --yes --output json

Query shows collection is, but the number of collections is still 100:

$ iris query nft denoms | grep "arkprotocol004"
  id: arkprotocol004

$ iris query nft denoms | grep "id:" | wc -l
100

Queries are paginated and there's --page with default value 1, however no matter what page is given it always currents the latest 100 collections:

$ iris query nft denoms | grep "arkprotocol004"
  id: arkprotocol004
$ iris query nft denoms | grep "id:" | wc -l
100
$ iris query nft denoms --page 100 | grep "id:" | wc -l
100
$ iris query nft denoms --page 1 | grep "id:" | wc -l
100
$ iris query nft denoms --page 2 | grep "id:" | wc -l
100
$ iris query nft denoms --page 3 | grep "id:" | wc -l
100
$ iris query nft denoms --page 4 | grep "id:" | wc -l
100
$ iris query nft denoms --page 10000 | grep "id:" | wc -l
100

Here is another example from ibc module where queries work properly:

$ iris query ibc channel channels --page 1 | grep '\- channel_id' | wc -l
39
$ iris query ibc channel channels --page 2 | grep '\- channel_id' | wc -l
0

Expected and Actual Behavior

Return collections based on pagination.

@taramakage taramakage added the bug Something isn't working label Mar 3, 2023
@taitruong
Copy link
Contributor Author

result output has pagination.next_key. The --page flag is not used here and should be removed.

@taramakage
Copy link
Member

This is not a bug. Iris has forbidden the use of --page, and you can only use --page-key.

@taitruong
Copy link
Contributor Author

This is not a bug. Iris has forbidden the use of --page, and you can only use --page-key.

Agree, but it then should show an error, like this:

$ iris query block --page 132
Error: unknown flag: --page

--page-key is at a couple of places: like iris query nft denoms and iris query nft collection. If you enter iris query nft denoms --help it shows --page uint pagination page of all denoms to query for. This sets offset to a multiple of limit (default 1).

For devs it might be not a bug, since it just ignores - for users it is, since --page is passed and provides some output and user wonders why it always outputs the same results for different pages :).

@taramakage taramakage reopened this Mar 27, 2023
@taitruong
Copy link
Contributor Author

As discussed with @taramakage, technically it seems to be irrelevant to ICS721. But here also from a business perspective: if a misleading command like iris query nft collection --page XYZ is not providing all tokens, then as a result, not all tokens can be transferred using ICS721.

We are all techies, but we sometimes need to see what business requirements there are in 1st place 😎!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants