Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Trait for deriving sovereign accounts of a pallet #8858

Closed
wants to merge 1 commit into from

Conversation

gavofyork
Copy link
Member

No description provided.

@gavofyork gavofyork added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D2-notlive 💤 PR contains changes in a runtime directory that is not deployed to a chain that requires an audit. labels May 19, 2021

impl<T: PalletInfoAccess> PalletIntoAccount for T {
fn into_sub_account<AccountId: Default + Encode + Decode, S: Encode>(sub: S) -> AccountId {
sp_runtime::traits::AccountIdConversion::into_sub_account(&PalletId::new::<T>(), sub)
Copy link
Contributor

@gui1117 gui1117 May 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this easily go beyond 64 bit or 128 bit no ?

for the pallet "RandomnessCollectiveFlip", the pallet id is 4 + 1 + 24 byte, its type id is 4 byte. So the front part is 33 byte.
So the sub part will always be silent (or only on some runtime, depending on what is the pallet name).

Currently AccountIdConversion has some concern #8564
I think they should considered here.

@stale
Copy link

stale bot commented Jul 7, 2021

Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Jul 7, 2021
@stale stale bot closed this Jul 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D2-notlive 💤 PR contains changes in a runtime directory that is not deployed to a chain that requires an audit.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants