BREAKING: Rename Origin (#12258)

* BREAKING: Rename Origin

* more renaming

* a bit more renaming

* fix

* more fixing

* fix in frame_support

* even more fixes

* fix

* small fix

* ...

* update .stderr

* docs

* update docs

* update docs

* docs
This commit is contained in:
Sergej Sakac
2022-09-21 00:13:09 +02:00
committed by GitHub
parent 986d20b352
commit e4b6f4a66d
221 changed files with 5233 additions and 4200 deletions
@@ -12,7 +12,7 @@ impl test_pallet::Config for Runtime {}
impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything;
type Origin = Origin;
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type BlockNumber = u32;
type RuntimeCall = RuntimeCall;
@@ -8,7 +8,7 @@ mod pallet_old {
}
decl_module! {
pub struct Module<T: Config> for enum Call where origin: T::Origin {}
pub struct Module<T: Config> for enum Call where origin: T::RuntimeOrigin {}
}
}
@@ -46,7 +46,7 @@ impl pallet::Config for Runtime {}
impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything;
type Origin = Origin;
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type BlockNumber = u32;
type RuntimeCall = RuntimeCall;
@@ -21,7 +21,7 @@ impl pallet::Config for Runtime {}
impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything;
type Origin = Origin;
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type BlockNumber = u32;
type RuntimeCall = RuntimeCall;
@@ -21,7 +21,7 @@ impl pallet::Config for Runtime {}
impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything;
type Origin = Origin;
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type BlockNumber = u32;
type RuntimeCall = RuntimeCall;
@@ -21,7 +21,7 @@ impl pallet::Config for Runtime {}
impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything;
type Origin = Origin;
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type BlockNumber = u32;
type RuntimeCall = RuntimeCall;
@@ -21,7 +21,7 @@ impl pallet::Config for Runtime {}
impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything;
type Origin = Origin;
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type BlockNumber = u32;
type RuntimeCall = RuntimeCall;
@@ -21,7 +21,7 @@ impl pallet::Config for Runtime {}
impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything;
type Origin = Origin;
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type BlockNumber = u32;
type RuntimeCall = RuntimeCall;
@@ -46,39 +46,6 @@ help: if you import `Origin`, refer to it directly
58 - }
|
error[E0412]: cannot find type `Origin` in module `pallet`
--> tests/construct_runtime_ui/undefined_origin_part.rs:49:1
|
49 | / construct_runtime! {
50 | | pub enum Runtime where
51 | | Block = Block,
52 | | NodeBlock = Block,
... |
57 | | }
58 | | }
| |_^ not found in `pallet`
|
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing one of these items
|
1 | use crate::Origin;
|
1 | use frame_system::Origin;
|
help: if you import `Origin`, refer to it directly
|
49 - construct_runtime! {
50 - pub enum Runtime where
51 - Block = Block,
52 - NodeBlock = Block,
53 - UncheckedExtrinsic = UncheckedExtrinsic
54 - {
55 - System: frame_system::{Pallet, Call, Storage, Config, Event<T>},
56 - Pallet: pallet::{Pallet, Origin},
57 - }
58 - }
|
error[E0282]: type annotations needed
--> tests/construct_runtime_ui/undefined_origin_part.rs:49:1
|
@@ -21,7 +21,7 @@ impl pallet::Config for Runtime {}
impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything;
type Origin = Origin;
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type BlockNumber = u32;
type RuntimeCall = RuntimeCall;