-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Remove pallet::getter usage from pallet-nft-fractionalization
#7124
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
Conversation
|
|
||
| /// Keeps track of the corresponding NFT ID, asset ID and amount minted. | ||
| #[pallet::storage] | ||
| #[pallet::getter(fn nft_to_asset)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is the explicit implementation of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not required since the storage item is public
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make a deprecate function with a deprecate message that link to the storage get call?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gui1117 deprecation messages are outside the scope of this individual PR which, like many others defined in #3326, is only responsible for removing getter usage from pallets.
I suggested adding a deprecation message in the original issue #223 (comment) however @ggwpez pointed out that CI would be unhappy and the deprecation message will be added later on, after removing its usage from all pallets in polkadot-sdk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@muraca but the other prs also added the getter method as normal function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I didn't meant to deprecate all getters I meant to keep the function by writing it manually and set it as deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bkchr @gui1117 I think you already know that an explicit getter is not needed, since the storage item is public and one can simply write NftToAsset::<T>::get(...). I have implemented an explicit getter anyway, to avoid breaking changes, since looks like this is the direction you want to bring these change towards, however I'm pretty sure that this was not the case when I first started working on these changes one year ago.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but we discussed to keep breaking changes to a minimal, if possible.
3798ff7
Description
Part of #3326
As per title,
pallet::getterusage has been removed frompallet-nft-fractionalization.