public-awesome / cw-ics721

CosmWasm IBC NFT Transfers
MIT License
59 stars 31 forks source link

Handle custom collections #96

Closed taitruong closed 4 months ago

taitruong commented 4 months ago

84 - use UniversalCollectionInfoResponse for handling custom collections

This is a very small change, but with huge impact: instead of using cw721::ContractInfoResponse, now ics721 defines its own UniversalCollectionInfoResponse.

Please note that cw721::ContractInfoResponse used cw_serde - so response needs to EXACTLY match struct. In case of custom collection it may hold addtional props - hence cw_serde thows an deny_unknown_fields error.

UniversalCollectionInfoResponse on the other hand just expects response to hold name and symbol for deserialization - all other props are ignored.

humanalgorithm commented 4 months ago

Sounds like you are just putting this for a type of flexible field no? If so, then approve.