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

feature request: ics721 handling custom collections #84

Open
taitruong opened this issue Feb 1, 2024 · 0 comments
Open

feature request: ics721 handling custom collections #84

taitruong opened this issue Feb 1, 2024 · 0 comments

Comments

@taitruong
Copy link
Collaborator

I was trying transferring a Juno NFT to Stargaze and got this error:
submessages: Error parsing into type cw721::query::ContractInfoResponse: unknown field minter, expected nameorsymbol: execute wasm contract failed [CosmWasm/wasmd@v0.45.0/x/wasm/keeper/keeper.go:395]

Reason is ics721 uses standard cw721, expecting ContractInfoResponse which should only contain name and symbol. But Juno collection has more than that.

command: junod query wasm contract-state smart juno1kpsy0mh58fzrl973ndvppujs9ea5xe9wggjhhg07c42l0yqk5n7st5800h '{"contract_info": {}}'

output:

{
  "data": {
    "name": "Atlas",
    "symbol": "ATL",
    "minter": "juno1xw99es9dwshk4hak3g9hajkppqu4lwnahzs0lkyd6zq7amj23pjqd7pnte",
    "royalty_bps": [
      250,
      250
    ],
    "royalty_addrs": [
      "juno1u8sql7kmx5pget7tavwlz6hhe3mxqn0h8yqr2xx288mk5g4xy58qd32as2",
      "juno1hcldlknu2mn3exckkg75tyzjnderl95zyjte2wl495z9jla0rmdqegxlxx"
    ],
    "second_admin": "juno1u8sql7kmx5pget7tavwlz6hhe3mxqn0h8yqr2xx288mk5g4xy58qd32as2"
  }
}

Solution: instead of using restrictive cw_serde, we can use serde for being more lenient and ignore all unknown fields.

@taitruong taitruong changed the title ics721 cant handle custom contracts (as expected) feature: ics721 handling custom collections Feb 1, 2024
@taitruong taitruong changed the title feature: ics721 handling custom collections feature request: ics721 handling custom collections Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant