Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frame/alliance/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ pub mod pallet {
type RuntimeEvent: From<Event<Self, I>>
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;

/// The outer call dispatch type.
/// The runtime call dispatch type.
type Proposal: Parameter
+ Dispatchable<RuntimeOrigin = Self::RuntimeOrigin, PostInfo = PostDispatchInfo>
+ From<frame_system::Call<Self>>
Expand Down
6 changes: 3 additions & 3 deletions frame/collective/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,18 +180,18 @@ pub mod pallet {

#[pallet::config]
pub trait Config<I: 'static = ()>: frame_system::Config {
/// The outer origin type.
/// The runtime origin type.
type RuntimeOrigin: From<RawOrigin<Self::AccountId, I>>;

/// The outer call dispatch type.
/// The runtime call dispatch type.
type Proposal: Parameter
+ Dispatchable<
RuntimeOrigin = <Self as Config<I>>::RuntimeOrigin,
PostInfo = PostDispatchInfo,
> + From<frame_system::Call<Self>>
+ GetDispatchInfo;

/// The outer event type.
/// The runtime event type.
type RuntimeEvent: From<Event<Self, I>>
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;

Expand Down
14 changes: 7 additions & 7 deletions frame/election-provider-multi-phase/src/unsigned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ mod tests {
use crate::{
mock::{
roll_to, roll_to_with_ocw, trim_helpers, witness, BlockNumber, ExtBuilder, Extrinsic,
MinerMaxWeight, MultiPhase, Runtime, RuntimeCall as OuterCall, RuntimeOrigin, System,
MinerMaxWeight, MultiPhase, Runtime, RuntimeCall, RuntimeOrigin, System,
TestNposSolution, TrimHelpers, UnsignedPhase,
},
CurrentPhase, InvalidTransaction, Phase, QueuedSolution, TransactionSource,
Expand Down Expand Up @@ -1070,8 +1070,8 @@ mod tests {
raw_solution: Box::new(solution.clone()),
witness: witness(),
};
let outer_call: OuterCall = call.into();
let _ = outer_call.dispatch(RuntimeOrigin::none());
let runtime_call: RuntimeCall = call.into();
let _ = runtime_call.dispatch(RuntimeOrigin::none());
})
}

Expand All @@ -1096,8 +1096,8 @@ mod tests {
raw_solution: Box::new(solution.clone()),
witness: correct_witness,
};
let outer_call: OuterCall = call.into();
let _ = outer_call.dispatch(RuntimeOrigin::none());
let runtime_call: RuntimeCall = call.into();
let _ = runtime_call.dispatch(RuntimeOrigin::none());
})
}

Expand Down Expand Up @@ -1560,7 +1560,7 @@ mod tests {
let encoded = pool.read().transactions[0].clone();
let extrinsic: Extrinsic = codec::Decode::decode(&mut &*encoded).unwrap();
let call = extrinsic.call;
assert!(matches!(call, OuterCall::MultiPhase(Call::submit_unsigned { .. })));
assert!(matches!(call, RuntimeCall::MultiPhase(Call::submit_unsigned { .. })));
})
}

Expand All @@ -1577,7 +1577,7 @@ mod tests {
let encoded = pool.read().transactions[0].clone();
let extrinsic = Extrinsic::decode(&mut &*encoded).unwrap();
let call = match extrinsic.call {
OuterCall::MultiPhase(call @ Call::submit_unsigned { .. }) => call,
RuntimeCall::MultiPhase(call @ Call::submit_unsigned { .. }) => call,
_ => panic!("bad call: unexpected submission"),
};

Expand Down
2 changes: 1 addition & 1 deletion frame/multisig/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fn setup_multi<T: Config>(
signatories.push(signatory);
}
signatories.sort();
// Must first convert to outer call type.
// Must first convert to runtime call type.
let call: <T as Config>::RuntimeCall =
frame_system::Call::<T>::remark { remark: vec![0; z as usize] }.into();
let call_data = OpaqueCall::<T>::from_encoded(call.encode());
Expand Down
2 changes: 1 addition & 1 deletion frame/ranked-collective/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ pub mod pallet {
/// Weight information for extrinsics in this pallet.
type WeightInfo: WeightInfo;

/// The outer event type.
/// The runtime event type.
type RuntimeEvent: From<Event<Self, I>>
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;

Expand Down