Skip to content
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

Remove pallet::getter usage from pallet-nft-fractionalization #7124

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

muraca
Copy link
Contributor

@muraca muraca commented Jan 13, 2025

Description
Part of #3326
As per title, pallet::getter usage has been removed from pallet-nft-fractionalization.

@muraca muraca marked this pull request as ready for review January 13, 2025 09:49
@muraca muraca requested a review from a team as a code owner January 13, 2025 09:49
@ggwpez ggwpez added the T2-pallets This PR/Issue is related to a particular pallet. label Jan 14, 2025
@@ -159,7 +159,6 @@ pub mod pallet {

/// Keeps track of the corresponding NFT ID, asset ID and amount minted.
#[pallet::storage]
#[pallet::getter(fn nft_to_asset)]
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor

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.

@muraca muraca requested review from gui1117 and bkchr February 14, 2025 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T2-pallets This PR/Issue is related to a particular pallet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants