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: wrong error message on transferring an NFT that doesn't exist (not minted/issued) #343

Closed
taitruong opened this issue Mar 8, 2023 · 3 comments
Labels
ics-721 Possible protocol vulnerability improv

Comments

@taitruong
Copy link
Contributor

Summary of Bug

I have collection, but this token I transferred doesn't exist. Error returned: not token owner: unauthorized

Environment

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

Steps to Reproduce

$ iris tx nft-transfer transfer 'nft-transfer' 'channel-22' 'stars183e7ccwsnngj2q8lfxnmekunspnfxs6q8nzqcf' 'arkprotocol002' 'fooBar'            --from iaa183e7ccwsnngj2q8lfxnmekunspnfxs6qxd4v3f            --fees 2000uiris            -b sync --yes --output json
{"height":"0","txhash":"8D7B5329B6339099C7FE012E9B3C4E69B36A381B7E8BD63B8E5B9BE344EEBCD0","codespace":"","code":0,"data":"","raw_log":"[]","logs":[],"info":"","gas_wanted":"0","gas_used":"0","tx":null,"timestamp":"","events":[]}

$ iris query tx 8D7B5329B6339099C7FE012E9B3C4E69B36A381B7E8BD63B8E5B9BE344EEBCD0 --output json | jq
{
  "height": "370014",
  "txhash": "8D7B5329B6339099C7FE012E9B3C4E69B36A381B7E8BD63B8E5B9BE344EEBCD0",
  "codespace": "sdk",
  "code": 4,
  "data": "",
  "raw_log": "failed to execute message; message index: 0: not token owner: unauthorized",

Expected and Actual Behavior

A better error message like token fooBar does not exist!

@taramakage
Copy link
Member

I believe this is a minor improvement, but not a bug.

@taitruong
Copy link
Contributor Author

I believe this is a minor improvement, but not a bug.

Also here from a functional/business point of view I'd say this is a bug :). It tells user, NFT exists and user is unauthorized to do interchain transfer. But this is not correct, since it doesn't even exist.

@taramakage
Copy link
Member

This problem has been fixed is nft-transfer#11.

PS: thanks to @taitruong and @giansalex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ics-721 Possible protocol vulnerability improv
Projects
None yet
Development

No branches or pull requests

2 participants