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

[NFTs] Some types are made private but it shouldn't #3631

Closed
2 tasks done
SailorSnoW opened this issue Mar 9, 2024 · 1 comment · Fixed by #3634
Closed
2 tasks done

[NFTs] Some types are made private but it shouldn't #3631

SailorSnoW opened this issue Mar 9, 2024 · 1 comment · Fixed by #3634
Labels
I2-bug The node fails to follow expected behavior. T2-pallets This PR/Issue is related to a particular pallet.

Comments

@SailorSnoW
Copy link
Contributor

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Description of bug

We are developing precompiles for the NFTs pallet and we need to call pay_tips dispatchable.
It require us to pass some ItemTip objects, but we cannot deal with the type ItemTip as struct properties are made public only for the pallet_nfts crate with pub(super).

Is it a voluntary design choice and so can we have an explanation on this ?

Previous types was fine, public visibility was not only for the crate.

Steps to reproduce

Try to create the type in an external crate:

pallet_nfts::ItemTip<CollectionId, ItemId, AccountId, Balance> { collection: Default::default(), ... }

giving error:
error: cannot construct pallet_nfts::ItemTip<CollectionId, ItemId, AccountId, Balance> with struct literal syntax due to private fields

@SailorSnoW SailorSnoW added I10-unconfirmed Issue might be valid, but it's not yet known. I2-bug The node fails to follow expected behavior. labels Mar 9, 2024
@ggwpez
Copy link
Member

ggwpez commented Mar 9, 2024

Yes looks odd. Could you maybe open a Merge Request to fix it?
Could be that there are more types suffering from this issue.

@ggwpez ggwpez added T2-pallets This PR/Issue is related to a particular pallet. and removed I10-unconfirmed Issue might be valid, but it's not yet known. labels Mar 9, 2024
github-merge-queue bot pushed a commit that referenced this issue Aug 15, 2024
fix #3631 

Types which are impacted and fixed here are `ItemTip`,
`PriceWithDirection`, `PreSignedMint`, `PreSignedAttributes`.

Co-authored-by: Bastian Köcher <git@kchr.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I2-bug The node fails to follow expected behavior. T2-pallets This PR/Issue is related to a particular pallet.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants