public-awesome / cw-nfts

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

Deserialization fails for juno cw721 contract #116

Open xoac opened 1 year ago

xoac commented 1 year ago

The contract juno1a90f8jdwm4h43yzqgj4xqzcfxt4l98ev970vwz6l9m02wxlpqd2squuv6k will fail to de-serialize into ContractInfoResposne.

    #[test]
    fn deserialize_juno_contract_info() {
        let raw = r#"{
            "type": "contract_info",
            "response": {
              "name": "Levana Dragons",
              "symbol": "LVNDRG",
              "royalty_bps": [
                400
              ],
              "royalty_addrs": [
                "juno19dkmvwf7ru5enm3ags334702lgtq7l4a75vvv9ry35zwqpd76rpq9qvukk"
              ]
            }
          }"#;

        let _: ContractInfoResponse = serde_json::from_str(&raw).unwrap();
    }

Is this expected behavior or bug?

Art3miX commented 1 year ago

You missing minter in the response? here is the info i get

{
  "type": "contract_info",
  "response": {
    "name": "Loop Airdrop NFTs",
    "symbol": "LAIR",
    "minter": "juno1feq3xa9dn3g3qsd3cdmxkedmettahaygchcntx60qumc6k5k45jqxtdyrw",
    "royalty_bps": [
      500
    ],
    "royalty_addrs": [
      "juno1fknslarrqwv3sz3wupr4s2s3uegm5llxxq6pgaz97japn68nadlq3ey5ms"
    ]
  }
}