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-alliance to umbrella crate #6541

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

Conversation

runcomet
Copy link
Contributor

@runcomet runcomet commented Nov 19, 2024

Part of #6504

Description

Modifying pallet-alliance to use umbrella crate whilst

  • Adding BoundedVec to frame::runtime::prelude, which I think should be necessary for mock runtimes in more than one pallet.
  • Creating the event module, included in the testing_prelude. This exports all relevant types used in event checking among various mock runtimes.

@cla-bot-2021
Copy link

cla-bot-2021 bot commented Nov 19, 2024

User @runcomet, please sign the CLA here.

@runcomet runcomet marked this pull request as ready for review November 23, 2024 03:26
@runcomet runcomet requested a review from a team as a code owner November 23, 2024 03:26
@runcomet
Copy link
Contributor Author

This also should be ready for review @re-gius 🙏

@runcomet
Copy link
Contributor Author

runcomet commented Dec 7, 2024

please review @kianenigma @re-gius

@re-gius re-gius added R0-silent Changes should not be mentioned in any release notes T1-FRAME This PR/Issue is related to core FRAME, the framework. labels Dec 9, 2024
substrate/frame/alliance/src/benchmarking.rs Outdated Show resolved Hide resolved
prdoc/pr_6541.prdoc Outdated Show resolved Hide resolved
use super::{Call as AllianceCall, Pallet as Alliance, *};
use core::{cmp, mem::size_of};
use frame::{benchmarking::prelude::*, traits::UnfilteredDispatchable};
use frame_system::Pallet as System;
Copy link
Contributor

Choose a reason for hiding this comment

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

As in my previous observation, please check if assert_last_event is widely used and should be added to the benchmarking prelude.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could leave things as

use frame::benchmarking::prelude::{*, RawOrigin as SystemOrigin, frame_system::Pallet as System};

until we migrate most pallets? @re-gius @kianenigma

Copy link
Contributor Author

Choose a reason for hiding this comment

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

assert_last_event are sometimes instantiable, creating one function for both occurrences?

please could you explain a bit more

substrate/frame/src/lib.rs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R0-silent Changes should not be mentioned in any release notes T1-FRAME This PR/Issue is related to core FRAME, the framework.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants