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

Migrate pallet-referenda to use umbrella crate #7236

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

Conversation

Nathy-bajo
Copy link

Part of #6504

Polkadot Address: 121HJWZtD13GJQPD82oEj3gSeHqsRYm1mFgRALu4L96kfPD1

@Nathy-bajo Nathy-bajo requested a review from a team as a code owner January 18, 2025 21:11
substrate/frame/referenda/Cargo.toml Show resolved Hide resolved
BoundedVec,
};
use frame_system::pallet_prelude::BlockNumberFor;

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

traits::{AtLeast32BitUnsigned, Bounded, Dispatchable, One, Saturating, Zero},
DispatchError, Perbill,
};

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

@@ -96,9 +94,9 @@ pub mod v1 {
/// Transforms a submission deposit of ReferendumInfo(Approved|Rejected|Cancelled|TimedOut) to
/// optional value, making it refundable.
pub struct MigrateV0ToV1<T, I = ()>(PhantomData<(T, I)>);
impl<T: Config<I>, I: 'static> OnRuntimeUpgrade for MigrateV0ToV1<T, I> {
impl<T: Config<I>, I: 'static> frame::traits::OnRuntimeUpgrade for MigrateV0ToV1<T, I> {
Copy link
Contributor

Choose a reason for hiding this comment

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

is it not in the prelude?

#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<Vec<u8>, TryRuntimeError> {
fn pre_upgrade() -> Result<Vec<u8>, frame::try_runtime::TryRuntimeError> {
Copy link
Contributor

Choose a reason for hiding this comment

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

is it not in the prelude?

Copy link
Author

Choose a reason for hiding this comment

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

No it is not

traits::{schedule::v3::Anon, Bounded},
Parameter,
};

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

Dispatchable, One, ReduceBy, ReplaceWithDefault, SaturatedConversion, Saturating,
StaticLookup, TrailingZeroInput, Zero,
},
BuildStorage, DispatchError, DispatchResult, FixedI64, PerThing, Perbill,
Copy link
Contributor

Choose a reason for hiding this comment

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

DispatchResult is already imported from frame-support and DispatchError is imported below.

Suggested change
BuildStorage, DispatchError, DispatchResult, FixedI64, PerThing, Perbill,
BuildStorage, FixedI64, PerThing, Perbill,

@paritytech-review-bot paritytech-review-bot bot requested a review from a team January 28, 2025 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants