-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c9d7526
removed pallet::getter usage from pallet-nft-fractionalization
muraca 19cd13d
prdoc
muraca ba67b39
Update prdoc/pr_7124.prdoc
ggwpez 2dd3759
Merge branch 'master' into getters/nft-fractionalization
muraca cb3fafd
Merge branch 'master' into getters/nft-fractionalization
muraca 2651fdb
explicit getter function
muraca File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| title: Remove pallet::getter from pallet-nft-fractionalization | ||
| doc: | ||
| - audience: Runtime Dev | ||
| description: | | ||
| This PR removes all pallet::getter occurrences from pallet-nft-fractionalization and replaces them with explicit implementations. | ||
|
|
||
| crates: | ||
| - name: pallet-nft-fractionalization | ||
| bump: major |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.