Skip to content

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

/// 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.

Copy link
Contributor Author

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.

Copy link
Member

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.

@muraca muraca requested review from bkchr and gui1117 February 14, 2025 09:04
@bkchr bkchr enabled auto-merge March 3, 2025 10:23
@bkchr bkchr added this pull request to the merge queue Mar 3, 2025
Merged via the queue into paritytech:master with commit 3798ff7 Mar 3, 2025
226 of 255 checks passed
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