public-awesome / cw-nfts

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

Is there an example of cw721-base with cw2981 royalties implemented? #134

Open yubrew opened 11 months ago

yubrew commented 11 months ago

I'm wondering in the context of ICS721 how to respect a collection's royalties from other host chains? https://github.com/CosmWasm/cw-nfts/tree/v0.18.0/contracts/cw2981-royalties

taitruong commented 11 months ago

Regarding ICS721 there is NonFungibleTokenPacketData.class_data : https://github.com/public-awesome/ics721/blob/main/contracts/cw-ics721-bridge/src/ibc.rs#L46 Here you can store all kinds of class/collection-based data. On the other side ICS721 then needs to handle this and depending on which cw721 contract, you can set things like royalties.

taitruong commented 11 months ago

Rn I'm finalizing ics721 and there will be an example of handling sg721, where royalty is stored in collection_info.

taitruong commented 3 weeks ago

Will be implemented by #156