-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Locks Logic To Lock Listed NFTs #75
Comments
i fear this same issue will come up in other ways. i think about equipping, and i implemented an "equipped" property on the NFT at the core level, to prevent equipping an item into both hands (for example). rmrk-substrate/traits/src/nft.rs Line 35 in e700853
i tried implementing some of the pseudo-code, but ran into a lot of grief...where the T's go, and where to use ClassId vs CollectionId. Do you know of an example of a pallet implementing this kind of dependency injection? |
I agree there seems to be some troubles being tightly coupled to uniques pallet. This was a big reason for the Lazy Ownership implementation to avoid having to track ownership in rmrk pallet, but this does make me wonder about the future if the uniques changes in the upstream to enable a capability that could cause unforeseen problems for rmrk pallet. I have an example from the polkadot repo for parachains to lease an auction slot. Here is that implementation. @h4x3rotab let me know if I missed any other code to reference the example. Define the Trait to be impl in Define Trait in Pallet Config called Impl the |
Being addressed in #76 |
#76 merged. |
Currently there is a limitation that doesn't allow for NFTs to be locked after they have been listed in the Market. Originally there was the idea to implement in the RMRK core pallet, but this leads to problems upstream in the Uniques pallet where Uniques will not have any knowledge of the locks mechanism defined in the RMRK core pallet. A current proposal would be to utilize a dependency injection trait defined in the Uniques pallet that would allow the RMRK core pallet to be able to enforce the locks logic by implementing the new trait.
A psuedo-code example can be found here by @h4x3rotab https://gist.github.com/h4x3rotab/152d05c9b5a18462e8dfe2b299b58db8
The plan would be to introduce the Uniques pallet code back into the RMRK repo temporarily until the code is ready to be submitted for review to be added to the Substrate Uniques pallet repository.
The text was updated successfully, but these errors were encountered: