public-awesome / cw-ics721

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

Add instantiate message registry #63

Closed Art3miX closed 1 year ago

Art3miX commented 1 year ago

Adds a way for ics721 to use different cw721 contracts without a need for codebase changes.

We would still need to use 2 ics721 contracts, 1 that uses "cw721-base" feature and one that uses "sg721-base" feature, but the difference is that the code of core ics721 doesn't change.

So development on ics721 can continue as usual, an any ics721 that uses different cw721 can easily pull update from core ics721, and the only change that would be needed is to change the features of the registry.

Benefits:

  1. No changes to core ics721 are needed in case of updates
  2. very easy to add new implementation not only for cw721 contracts but also for service like ics721

Drawbacks:

  1. Can't use in a workspace with 2 different features, features are additive, meaning the first contract will enable feature X, the second contract will have feature X without explicitly adding it. This only true for optimizing workspaces, as a workaround its possible to optimize each contract separately.
  2. If you do update from core ics721, you will need to modify the feature of the registry dependency,

Some stuff to do:

shanev commented 1 year ago

Fixed in #67