rmrk-team / rmrk-substrate

[WIP] RMRK Substrate pallets
https://rmrk.app
Other
74 stars 36 forks source link

Restrict direct pallet_uniques calls #151

Closed ilionic closed 2 years ago

ilionic commented 2 years ago

Using BaseCallFilter disable direct calls to pallet_uniques since it could lead to unexpected bugs in rmrk pallets if calling uniques extrinsics directly.

Example

HashWarlock commented 2 years ago

Here's an example from what I did for Uniques for Phala World integration. This blocks the defined functions & allows the rest of the functions that we needed.

https://github.com/Phala-Network/khala-parachain/blob/61acdfb4fc75413522b21bb3b0a9775cfd0fff83/runtime/khala/src/lib.rs#L301-L322

I think the RMRK pallet will only need access to the function set_accept_ownership since it will be needed for Collections that get transferred to a new owner which requires the new owner to call the set_accept_ownership before facilitating the transfer. Other Calls can be ignored.