mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 18:41:03 +00:00
Vstam1/xcm admin origin (#6928)
* Ensure for a configurable origin in XCM (#6442), cherry picked from 5ae05e1a957857c449a43d8759a21292d03fd049 Add new associated type, AdminOrigin, bounded by EnsureOrigin trait in XCM pallet. Replace ensure_root() with ensure_origin() from a EnsureOrigin trait. Set AdminOrigin as EnsureRoot<AccountId> in xcm configs. * cargo fmt * small stylistic change --------- Co-authored-by: serkul <serkul@pop-os.localdomain>
This commit is contained in:
@@ -22,6 +22,8 @@ use frame_support::{
|
||||
traits::{Everything, Nothing},
|
||||
weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight},
|
||||
};
|
||||
|
||||
use frame_system::EnsureRoot;
|
||||
use sp_core::{ConstU32, H256};
|
||||
use sp_runtime::{
|
||||
testing::Header,
|
||||
@@ -339,6 +341,7 @@ impl pallet_xcm::Config for Runtime {
|
||||
type WeightInfo = pallet_xcm::TestWeightInfo;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
type ReachableDest = ReachableDest;
|
||||
type AdminOrigin = EnsureRoot<AccountId>;
|
||||
}
|
||||
|
||||
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Runtime>;
|
||||
|
||||
Reference in New Issue
Block a user