Skip to content

Commit e9116df

Browse files
Szegooshawntabrizi
andauthored
Companion for #11981 (#5915)
* Companion for #11981 * more renaming * fmt * fixes * add generic type * Companion for #11831 * fix * revert changes * Delete rename-outer-enum.diff * revert * Update run_benches_for_runtime.sh * rename type Call & type Event * passing tests * fmt * small fixes * commit * fix * fmt * commit * error fixes * fix * small fix in test * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * remove RuntimeCall from pallet_grandpa * last fix * commit * rename * merge fix * update lockfile for {"substrate"} * cargo +nightly fmt * fix Co-authored-by: parity-processbot <> Co-authored-by: Shawn Tabrizi <[email protected]>
1 parent 0e6ee7f commit e9116df

File tree

8 files changed

+287
-266
lines changed

8 files changed

+287
-266
lines changed

polkadot/runtime/westend/src/weights/xcm/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ impl WeighMultiAssets for MultiAssets {
7272
}
7373
}
7474

75-
pub struct WestendXcmWeight<Call>(core::marker::PhantomData<Call>);
76-
impl<Call> XcmWeightInfo<Call> for WestendXcmWeight<Call> {
75+
pub struct WestendXcmWeight<RuntimeCall>(core::marker::PhantomData<RuntimeCall>);
76+
impl<RuntimeCall> XcmWeightInfo<RuntimeCall> for WestendXcmWeight<RuntimeCall> {
7777
fn withdraw_asset(assets: &MultiAssets) -> XCMWeight {
7878
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::withdraw_asset())
7979
}
@@ -99,7 +99,7 @@ impl<Call> XcmWeightInfo<Call> for WestendXcmWeight<Call> {
9999
fn transact(
100100
_origin_type: &OriginKind,
101101
_require_weight_at_most: &u64,
102-
_call: &DoubleEncoded<Call>,
102+
_call: &DoubleEncoded<RuntimeCall>,
103103
) -> XCMWeight {
104104
XcmGeneric::<Runtime>::transact().ref_time()
105105
}
@@ -179,10 +179,10 @@ impl<Call> XcmWeightInfo<Call> for WestendXcmWeight<Call> {
179179
fn refund_surplus() -> XCMWeight {
180180
XcmGeneric::<Runtime>::refund_surplus().ref_time()
181181
}
182-
fn set_error_handler(_xcm: &Xcm<Call>) -> XCMWeight {
182+
fn set_error_handler(_xcm: &Xcm<RuntimeCall>) -> XCMWeight {
183183
XcmGeneric::<Runtime>::set_error_handler().ref_time()
184184
}
185-
fn set_appendix(_xcm: &Xcm<Call>) -> XCMWeight {
185+
fn set_appendix(_xcm: &Xcm<RuntimeCall>) -> XCMWeight {
186186
XcmGeneric::<Runtime>::set_appendix().ref_time()
187187
}
188188
fn clear_error() -> XCMWeight {

relay/kusama/src/governance/old.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ parameter_types! {
3232
}
3333

3434
impl pallet_democracy::Config for Runtime {
35-
type Proposal = Call;
36-
type Event = Event;
35+
type Proposal = RuntimeCall;
36+
type RuntimeEvent = RuntimeEvent;
3737
type Currency = Balances;
3838
type EnactmentPeriod = EnactmentPeriod;
3939
type VoteLockingPeriod = EnactmentPeriod;
@@ -93,8 +93,8 @@ parameter_types! {
9393
pub type CouncilCollective = pallet_collective::Instance1;
9494
impl pallet_collective::Config<CouncilCollective> for Runtime {
9595
type Origin = Origin;
96-
type Proposal = Call;
97-
type Event = Event;
96+
type Proposal = RuntimeCall;
97+
type RuntimeEvent = RuntimeEvent;
9898
type MotionDuration = CouncilMotionDuration;
9999
type MaxProposals = CouncilMaxProposals;
100100
type MaxMembers = CouncilMaxMembers;
@@ -121,7 +121,7 @@ parameter_types! {
121121
const_assert!(DesiredMembers::get() <= CouncilMaxMembers::get());
122122

123123
impl pallet_elections_phragmen::Config for Runtime {
124-
type Event = Event;
124+
type RuntimeEvent = RuntimeEvent;
125125
type Currency = Balances;
126126
type ChangeMembers = Council;
127127
type InitializeMembers = Council;
@@ -149,8 +149,8 @@ parameter_types! {
149149
pub type TechnicalCollective = pallet_collective::Instance2;
150150
impl pallet_collective::Config<TechnicalCollective> for Runtime {
151151
type Origin = Origin;
152-
type Proposal = Call;
153-
type Event = Event;
152+
type Proposal = RuntimeCall;
153+
type RuntimeEvent = RuntimeEvent;
154154
type MotionDuration = TechnicalMotionDuration;
155155
type MaxProposals = TechnicalMaxProposals;
156156
type MaxMembers = TechnicalMaxMembers;
@@ -159,7 +159,7 @@ impl pallet_collective::Config<TechnicalCollective> for Runtime {
159159
}
160160

161161
impl pallet_membership::Config<pallet_membership::Instance1> for Runtime {
162-
type Event = Event;
162+
type RuntimeEvent = RuntimeEvent;
163163
type AddOrigin = MoreThanHalfCouncil;
164164
type RemoveOrigin = MoreThanHalfCouncil;
165165
type SwapOrigin = MoreThanHalfCouncil;

0 commit comments

Comments
 (0)