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:
Sergej Sakac
2022-09-21 01:17:31 +02:00
committed by GitHub
parent 6f40bb9efe
commit 14186393b2
35 changed files with 488 additions and 458 deletions
@@ -96,7 +96,7 @@ pub struct RuntimeHelper<Runtime>(PhantomData<Runtime>);
impl<Runtime: frame_system::Config> RuntimeHelper<Runtime>
where
AccountIdOf<Runtime>:
Into<<<Runtime as frame_system::Config>::Origin as OriginTrait>::AccountId>,
Into<<<Runtime as frame_system::Config>::RuntimeOrigin as OriginTrait>::AccountId>,
{
pub fn run_to_block(n: u32, author: Option<AccountId>) {
while frame_system::Pallet::<Runtime>::block_number() < n.into() {
@@ -122,13 +122,13 @@ where
}
}
pub fn root_origin() -> <Runtime as frame_system::Config>::Origin {
<Runtime as frame_system::Config>::Origin::root()
pub fn root_origin() -> <Runtime as frame_system::Config>::RuntimeOrigin {
<Runtime as frame_system::Config>::RuntimeOrigin::root()
}
pub fn origin_of(
account_id: AccountIdOf<Runtime>,
) -> <Runtime as frame_system::Config>::Origin {
<Runtime as frame_system::Config>::Origin::signed(account_id.into())
) -> <Runtime as frame_system::Config>::RuntimeOrigin {
<Runtime as frame_system::Config>::RuntimeOrigin::signed(account_id.into())
}
}