mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 12:37:57 +00:00
Rename Origin (#1628)
* Rename Origin
* more renaming
* fixes
* fix errors
* last fix?
* rename
* Update mock.rs
* update lockfile for {"polkadot", "substrate"}
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -49,8 +49,8 @@ pub mod pallet {
|
||||
/// The overarching event type.
|
||||
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>>;
|
||||
type RuntimeOrigin: From<<Self as SystemConfig>::RuntimeOrigin>
|
||||
+ Into<Result<CumulusOrigin, <Self as Config>::RuntimeOrigin>>;
|
||||
|
||||
/// The overarching call type; we assume sibling chains use the same type.
|
||||
type RuntimeCall: From<Call<Self>> + Encode;
|
||||
@@ -190,7 +190,7 @@ pub mod pallet {
|
||||
#[pallet::weight(0)]
|
||||
pub fn ping(origin: OriginFor<T>, seq: u32, payload: Vec<u8>) -> DispatchResult {
|
||||
// Only accept pings from other chains.
|
||||
let para = ensure_sibling_para(<T as Config>::Origin::from(origin))?;
|
||||
let para = ensure_sibling_para(<T as Config>::RuntimeOrigin::from(origin))?;
|
||||
|
||||
Self::deposit_event(Event::Pinged(para, seq, payload.clone()));
|
||||
match T::XcmSender::send_xcm(
|
||||
@@ -215,7 +215,7 @@ pub mod pallet {
|
||||
#[pallet::weight(0)]
|
||||
pub fn pong(origin: OriginFor<T>, seq: u32, payload: Vec<u8>) -> DispatchResult {
|
||||
// Only accept pings from other chains.
|
||||
let para = ensure_sibling_para(<T as Config>::Origin::from(origin))?;
|
||||
let para = ensure_sibling_para(<T as Config>::RuntimeOrigin::from(origin))?;
|
||||
|
||||
if let Some(sent_at) = Pings::<T>::take(seq) {
|
||||
Self::deposit_event(Event::Ponged(
|
||||
|
||||
Reference in New Issue
Block a user