Companion for #11981 (#1563)

* Companion for #11981

* rename

* Event to RuntimeEvent in imports

* missed rename

* undo

* revert

* rename type Call & Event

* commit

* ...

* fix

* fix errors

* fixes

* fmt

* fix imports

* final fix?

* fmt

* fix?

* fixes after merge

* small fix

* cargo update -p polkadot-runtime-common

* cargo +nightly fmt

* update lockfile for {"polkadot", "substrate"}

* fix

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: parity-processbot <>
This commit is contained in:
Sergej Sakac
2022-09-13 01:55:33 +02:00
committed by GitHub
parent 51eb647826
commit b43bc58cb6
39 changed files with 1020 additions and 958 deletions
+4 -4
View File
@@ -47,13 +47,13 @@ pub mod pallet {
#[pallet::config]
pub trait Config: frame_system::Config {
/// The overarching event type.
type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>;
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
type Origin: From<<Self as SystemConfig>::Origin>
+ Into<Result<CumulusOrigin, <Self as Config>::Origin>>;
/// The overarching call type; we assume sibling chains use the same type.
type Call: From<Call<Self>> + Encode;
type RuntimeCall: From<Call<Self>> + Encode;
type XcmSender: SendXcm;
}
@@ -108,7 +108,7 @@ pub mod pallet {
Xcm(vec![Transact {
origin_type: OriginKind::Native,
require_weight_at_most: 1_000,
call: <T as Config>::Call::from(Call::<T>::ping {
call: <T as Config>::RuntimeCall::from(Call::<T>::ping {
seq,
payload: payload.clone().to_vec(),
})
@@ -198,7 +198,7 @@ pub mod pallet {
Xcm(vec![Transact {
origin_type: OriginKind::Native,
require_weight_at_most: 1_000,
call: <T as Config>::Call::from(Call::<T>::pong {
call: <T as Config>::RuntimeCall::from(Call::<T>::pong {
seq,
payload: payload.clone(),
})