mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
Moves all test runtimes to use derive_impl (#2409)
Step in https://github.com/paritytech/polkadot-sdk/issues/171 This PR adds `derive_impl` on all `frame_system` config impls for mock runtimes. The overridden configs are maintained as of now to ensure minimal changes. --------- Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
+2
-1
@@ -15,7 +15,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use frame_support::construct_runtime;
|
||||
use frame_support::{construct_runtime, derive_impl};
|
||||
use sp_core::sr25519;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
|
||||
@@ -36,6 +36,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Sign
|
||||
|
||||
impl pallet::Config for Runtime {}
|
||||
|
||||
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
|
||||
+13
-13
@@ -1,7 +1,7 @@
|
||||
error: The number of pallets exceeds the maximum number of tuple elements. To increase this limit, enable the tuples-96 feature of [frame_support].
|
||||
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:66:2
|
||||
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:67:2
|
||||
|
|
||||
66 | pub struct Runtime
|
||||
67 | pub struct Runtime
|
||||
| ^^^
|
||||
|
||||
error[E0412]: cannot find type `RuntimeCall` in this scope
|
||||
@@ -22,38 +22,38 @@ error[E0412]: cannot find type `Runtime` in this scope
|
||||
| ^^^^^^^ not found in this scope
|
||||
|
||||
error[E0412]: cannot find type `Runtime` in this scope
|
||||
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:39:31
|
||||
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:40:31
|
||||
|
|
||||
39 | impl frame_system::Config for Runtime {
|
||||
40 | impl frame_system::Config for Runtime {
|
||||
| ^^^^^^^ not found in this scope
|
||||
|
||||
error[E0412]: cannot find type `RuntimeOrigin` in this scope
|
||||
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:41:23
|
||||
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:42:23
|
||||
|
|
||||
41 | type RuntimeOrigin = RuntimeOrigin;
|
||||
42 | type RuntimeOrigin = RuntimeOrigin;
|
||||
| ^^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeOrigin`
|
||||
|
||||
error[E0412]: cannot find type `RuntimeCall` in this scope
|
||||
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:43:21
|
||||
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:44:21
|
||||
|
|
||||
43 | type RuntimeCall = RuntimeCall;
|
||||
44 | type RuntimeCall = RuntimeCall;
|
||||
| ^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeCall`
|
||||
|
||||
error[E0412]: cannot find type `RuntimeEvent` in this scope
|
||||
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:49:22
|
||||
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:50:22
|
||||
|
|
||||
49 | type RuntimeEvent = RuntimeEvent;
|
||||
50 | type RuntimeEvent = RuntimeEvent;
|
||||
| ^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeEvent`
|
||||
|
||||
error[E0412]: cannot find type `PalletInfo` in this scope
|
||||
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:55:20
|
||||
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:56:20
|
||||
|
|
||||
55 | type PalletInfo = PalletInfo;
|
||||
56 | type PalletInfo = PalletInfo;
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
help: you might have meant to use the associated type
|
||||
|
|
||||
55 | type PalletInfo = Self::PalletInfo;
|
||||
56 | type PalletInfo = Self::PalletInfo;
|
||||
| ~~~~~~~~~~~~~~~~
|
||||
help: consider importing one of these items
|
||||
|
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use frame_support::construct_runtime;
|
||||
use frame_support::{construct_runtime, derive_impl};
|
||||
use sp_core::sr25519;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
|
||||
@@ -61,6 +61,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Sign
|
||||
|
||||
impl pallet::Config for Runtime {}
|
||||
|
||||
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
|
||||
+9
-9
@@ -1,13 +1,13 @@
|
||||
error[E0080]: evaluation of constant value failed
|
||||
--> tests/construct_runtime_ui/pallet_error_too_large.rs:90:1
|
||||
--> tests/construct_runtime_ui/pallet_error_too_large.rs:91:1
|
||||
|
|
||||
90 | / construct_runtime! {
|
||||
91 | | pub struct Runtime
|
||||
92 | | {
|
||||
93 | | System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
94 | | Pallet: pallet::{Pallet},
|
||||
95 | | }
|
||||
96 | | }
|
||||
| |_^ the evaluated program panicked at 'The maximum encoded size of the error type in the `Pallet` pallet exceeds `MAX_MODULE_ERROR_ENCODED_SIZE`', $DIR/tests/construct_runtime_ui/pallet_error_too_large.rs:90:1
|
||||
91 | / construct_runtime! {
|
||||
92 | | pub struct Runtime
|
||||
93 | | {
|
||||
94 | | System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
95 | | Pallet: pallet::{Pallet},
|
||||
96 | | }
|
||||
97 | | }
|
||||
| |_^ the evaluated program panicked at 'The maximum encoded size of the error type in the `Pallet` pallet exceeds `MAX_MODULE_ERROR_ENCODED_SIZE`', $DIR/tests/construct_runtime_ui/pallet_error_too_large.rs:91:1
|
||||
|
|
||||
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use frame_support::construct_runtime;
|
||||
use frame_support::{construct_runtime, derive_impl};
|
||||
use sp_core::sr25519;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
|
||||
@@ -36,6 +36,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Sign
|
||||
|
||||
impl pallet::Config for Runtime {}
|
||||
|
||||
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
|
||||
@@ -4,13 +4,13 @@ error: `Pallet` does not have #[pallet::call] defined, perhaps you should remove
|
||||
22 | #[frame_support::pallet]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
...
|
||||
65 | / construct_runtime! {
|
||||
66 | | pub struct Runtime
|
||||
67 | | {
|
||||
68 | | System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
69 | | Pallet: pallet::{Pallet, Call},
|
||||
70 | | }
|
||||
71 | | }
|
||||
66 | / construct_runtime! {
|
||||
67 | | pub struct Runtime
|
||||
68 | | {
|
||||
69 | | System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
70 | | Pallet: pallet::{Pallet, Call},
|
||||
71 | | }
|
||||
72 | | }
|
||||
| |_- in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `pallet::__substrate_call_check::is_call_part_defined` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use frame_support::construct_runtime;
|
||||
use frame_support::{construct_runtime, derive_impl};
|
||||
use sp_core::sr25519;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
|
||||
@@ -36,6 +36,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Sign
|
||||
|
||||
impl pallet::Config for Runtime {}
|
||||
|
||||
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
|
||||
+15
-15
@@ -4,27 +4,27 @@ error: `Pallet` does not have #[pallet::event] defined, perhaps you should remov
|
||||
22 | #[frame_support::pallet]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
...
|
||||
65 | / construct_runtime! {
|
||||
66 | | pub struct Runtime
|
||||
67 | | {
|
||||
68 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
69 | | Pallet: pallet expanded::{}::{Pallet, Event},
|
||||
70 | | }
|
||||
71 | | }
|
||||
66 | / construct_runtime! {
|
||||
67 | | pub struct Runtime
|
||||
68 | | {
|
||||
69 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
70 | | Pallet: pallet expanded::{}::{Pallet, Event},
|
||||
71 | | }
|
||||
72 | | }
|
||||
| |_- in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `pallet::__substrate_event_check::is_event_part_defined` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0412]: cannot find type `Event` in module `pallet`
|
||||
--> tests/construct_runtime_ui/undefined_event_part.rs:65:1
|
||||
--> tests/construct_runtime_ui/undefined_event_part.rs:66:1
|
||||
|
|
||||
65 | / construct_runtime! {
|
||||
66 | | pub struct Runtime
|
||||
67 | | {
|
||||
68 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
69 | | Pallet: pallet expanded::{}::{Pallet, Event},
|
||||
70 | | }
|
||||
71 | | }
|
||||
66 | / construct_runtime! {
|
||||
67 | | pub struct Runtime
|
||||
68 | | {
|
||||
69 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
70 | | Pallet: pallet expanded::{}::{Pallet, Event},
|
||||
71 | | }
|
||||
72 | | }
|
||||
| |_^ not found in `pallet`
|
||||
|
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
+2
-1
@@ -15,7 +15,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use frame_support::construct_runtime;
|
||||
use frame_support::{construct_runtime, derive_impl};
|
||||
use sp_core::sr25519;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
|
||||
@@ -36,6 +36,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Sign
|
||||
|
||||
impl pallet::Config for Runtime {}
|
||||
|
||||
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
|
||||
+15
-15
@@ -4,27 +4,27 @@ error: `Pallet` does not have #[pallet::genesis_config] defined, perhaps you sho
|
||||
22 | #[frame_support::pallet]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
...
|
||||
65 | / construct_runtime! {
|
||||
66 | | pub struct Runtime
|
||||
67 | | {
|
||||
68 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
69 | | Pallet: pallet expanded::{}::{Pallet, Config},
|
||||
70 | | }
|
||||
71 | | }
|
||||
66 | / construct_runtime! {
|
||||
67 | | pub struct Runtime
|
||||
68 | | {
|
||||
69 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
70 | | Pallet: pallet expanded::{}::{Pallet, Config},
|
||||
71 | | }
|
||||
72 | | }
|
||||
| |_- in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `pallet::__substrate_genesis_config_check::is_genesis_config_defined` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0412]: cannot find type `GenesisConfig` in module `pallet`
|
||||
--> tests/construct_runtime_ui/undefined_genesis_config_part.rs:65:1
|
||||
--> tests/construct_runtime_ui/undefined_genesis_config_part.rs:66:1
|
||||
|
|
||||
65 | / construct_runtime! {
|
||||
66 | | pub struct Runtime
|
||||
67 | | {
|
||||
68 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
69 | | Pallet: pallet expanded::{}::{Pallet, Config},
|
||||
70 | | }
|
||||
71 | | }
|
||||
66 | / construct_runtime! {
|
||||
67 | | pub struct Runtime
|
||||
68 | | {
|
||||
69 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
70 | | Pallet: pallet expanded::{}::{Pallet, Config},
|
||||
71 | | }
|
||||
72 | | }
|
||||
| |_^ not found in `pallet`
|
||||
|
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use frame_support::construct_runtime;
|
||||
use frame_support::{construct_runtime, derive_impl};
|
||||
use sp_core::sr25519;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
|
||||
@@ -36,6 +36,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Sign
|
||||
|
||||
impl pallet::Config for Runtime {}
|
||||
|
||||
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
|
||||
+47
-47
@@ -4,31 +4,31 @@ error: `Pallet` does not have #[pallet::inherent] defined, perhaps you should re
|
||||
22 | #[frame_support::pallet]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
...
|
||||
65 | / construct_runtime! {
|
||||
66 | | pub struct Runtime
|
||||
67 | | {
|
||||
68 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
69 | | Pallet: pallet expanded::{}::{Pallet, Inherent},
|
||||
70 | | }
|
||||
71 | | }
|
||||
66 | / construct_runtime! {
|
||||
67 | | pub struct Runtime
|
||||
68 | | {
|
||||
69 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
70 | | Pallet: pallet expanded::{}::{Pallet, Inherent},
|
||||
71 | | }
|
||||
72 | | }
|
||||
| |_- in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `pallet::__substrate_inherent_check::is_inherent_part_defined` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0599]: no function or associated item named `create_inherent` found for struct `pallet::Pallet` in the current scope
|
||||
--> tests/construct_runtime_ui/undefined_inherent_part.rs:65:1
|
||||
--> tests/construct_runtime_ui/undefined_inherent_part.rs:66:1
|
||||
|
|
||||
28 | pub struct Pallet<T>(_);
|
||||
| -------------------- function or associated item `create_inherent` not found for this struct
|
||||
...
|
||||
65 | construct_runtime! {
|
||||
66 | construct_runtime! {
|
||||
| _^
|
||||
66 | | pub struct Runtime
|
||||
67 | | {
|
||||
68 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
69 | | Pallet: pallet expanded::{}::{Pallet, Inherent},
|
||||
70 | | }
|
||||
71 | | }
|
||||
67 | | pub struct Runtime
|
||||
68 | | {
|
||||
69 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
70 | | Pallet: pallet expanded::{}::{Pallet, Inherent},
|
||||
71 | | }
|
||||
72 | | }
|
||||
| |_^ function or associated item not found in `Pallet<Runtime>`
|
||||
|
|
||||
= help: items from traits can only be used if the trait is implemented and in scope
|
||||
@@ -37,19 +37,19 @@ error[E0599]: no function or associated item named `create_inherent` found for s
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0599]: no function or associated item named `is_inherent` found for struct `pallet::Pallet` in the current scope
|
||||
--> tests/construct_runtime_ui/undefined_inherent_part.rs:65:1
|
||||
--> tests/construct_runtime_ui/undefined_inherent_part.rs:66:1
|
||||
|
|
||||
28 | pub struct Pallet<T>(_);
|
||||
| -------------------- function or associated item `is_inherent` not found for this struct
|
||||
...
|
||||
65 | construct_runtime! {
|
||||
66 | construct_runtime! {
|
||||
| _^
|
||||
66 | | pub struct Runtime
|
||||
67 | | {
|
||||
68 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
69 | | Pallet: pallet expanded::{}::{Pallet, Inherent},
|
||||
70 | | }
|
||||
71 | | }
|
||||
67 | | pub struct Runtime
|
||||
68 | | {
|
||||
69 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
70 | | Pallet: pallet expanded::{}::{Pallet, Inherent},
|
||||
71 | | }
|
||||
72 | | }
|
||||
| |_^ function or associated item not found in `Pallet<Runtime>`
|
||||
|
|
||||
= help: items from traits can only be used if the trait is implemented and in scope
|
||||
@@ -58,19 +58,19 @@ error[E0599]: no function or associated item named `is_inherent` found for struc
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0599]: no function or associated item named `check_inherent` found for struct `pallet::Pallet` in the current scope
|
||||
--> tests/construct_runtime_ui/undefined_inherent_part.rs:65:1
|
||||
--> tests/construct_runtime_ui/undefined_inherent_part.rs:66:1
|
||||
|
|
||||
28 | pub struct Pallet<T>(_);
|
||||
| -------------------- function or associated item `check_inherent` not found for this struct
|
||||
...
|
||||
65 | construct_runtime! {
|
||||
66 | construct_runtime! {
|
||||
| _^
|
||||
66 | | pub struct Runtime
|
||||
67 | | {
|
||||
68 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
69 | | Pallet: pallet expanded::{}::{Pallet, Inherent},
|
||||
70 | | }
|
||||
71 | | }
|
||||
67 | | pub struct Runtime
|
||||
68 | | {
|
||||
69 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
70 | | Pallet: pallet expanded::{}::{Pallet, Inherent},
|
||||
71 | | }
|
||||
72 | | }
|
||||
| |_^ function or associated item not found in `Pallet<Runtime>`
|
||||
|
|
||||
= help: items from traits can only be used if the trait is implemented and in scope
|
||||
@@ -79,19 +79,19 @@ error[E0599]: no function or associated item named `check_inherent` found for st
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0599]: no associated item named `INHERENT_IDENTIFIER` found for struct `pallet::Pallet` in the current scope
|
||||
--> tests/construct_runtime_ui/undefined_inherent_part.rs:65:1
|
||||
--> tests/construct_runtime_ui/undefined_inherent_part.rs:66:1
|
||||
|
|
||||
28 | pub struct Pallet<T>(_);
|
||||
| -------------------- associated item `INHERENT_IDENTIFIER` not found for this struct
|
||||
...
|
||||
65 | construct_runtime! {
|
||||
66 | construct_runtime! {
|
||||
| _^
|
||||
66 | | pub struct Runtime
|
||||
67 | | {
|
||||
68 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
69 | | Pallet: pallet expanded::{}::{Pallet, Inherent},
|
||||
70 | | }
|
||||
71 | | }
|
||||
67 | | pub struct Runtime
|
||||
68 | | {
|
||||
69 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
70 | | Pallet: pallet expanded::{}::{Pallet, Inherent},
|
||||
71 | | }
|
||||
72 | | }
|
||||
| |_^ associated item not found in `Pallet<Runtime>`
|
||||
|
|
||||
= help: items from traits can only be used if the trait is implemented and in scope
|
||||
@@ -100,19 +100,19 @@ error[E0599]: no associated item named `INHERENT_IDENTIFIER` found for struct `p
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0599]: no function or associated item named `is_inherent_required` found for struct `pallet::Pallet` in the current scope
|
||||
--> tests/construct_runtime_ui/undefined_inherent_part.rs:65:1
|
||||
--> tests/construct_runtime_ui/undefined_inherent_part.rs:66:1
|
||||
|
|
||||
28 | pub struct Pallet<T>(_);
|
||||
| -------------------- function or associated item `is_inherent_required` not found for this struct
|
||||
...
|
||||
65 | construct_runtime! {
|
||||
66 | construct_runtime! {
|
||||
| _^
|
||||
66 | | pub struct Runtime
|
||||
67 | | {
|
||||
68 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
69 | | Pallet: pallet expanded::{}::{Pallet, Inherent},
|
||||
70 | | }
|
||||
71 | | }
|
||||
67 | | pub struct Runtime
|
||||
68 | | {
|
||||
69 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
70 | | Pallet: pallet expanded::{}::{Pallet, Inherent},
|
||||
71 | | }
|
||||
72 | | }
|
||||
| |_^ function or associated item not found in `Pallet<Runtime>`
|
||||
|
|
||||
= help: items from traits can only be used if the trait is implemented and in scope
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use frame_support::construct_runtime;
|
||||
use frame_support::{construct_runtime, derive_impl};
|
||||
use sp_core::sr25519;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
|
||||
@@ -36,6 +36,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Sign
|
||||
|
||||
impl pallet::Config for Runtime {}
|
||||
|
||||
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
|
||||
+15
-15
@@ -4,27 +4,27 @@ error: `Pallet` does not have #[pallet::origin] defined, perhaps you should remo
|
||||
22 | #[frame_support::pallet]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
...
|
||||
65 | / construct_runtime! {
|
||||
66 | | pub struct Runtime
|
||||
67 | | {
|
||||
68 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
69 | | Pallet: pallet expanded::{}::{Pallet, Origin},
|
||||
70 | | }
|
||||
71 | | }
|
||||
66 | / construct_runtime! {
|
||||
67 | | pub struct Runtime
|
||||
68 | | {
|
||||
69 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
70 | | Pallet: pallet expanded::{}::{Pallet, Origin},
|
||||
71 | | }
|
||||
72 | | }
|
||||
| |_- in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `pallet::__substrate_origin_check::is_origin_part_defined` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0412]: cannot find type `Origin` in module `pallet`
|
||||
--> tests/construct_runtime_ui/undefined_origin_part.rs:65:1
|
||||
--> tests/construct_runtime_ui/undefined_origin_part.rs:66:1
|
||||
|
|
||||
65 | / construct_runtime! {
|
||||
66 | | pub struct Runtime
|
||||
67 | | {
|
||||
68 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
69 | | Pallet: pallet expanded::{}::{Pallet, Origin},
|
||||
70 | | }
|
||||
71 | | }
|
||||
66 | / construct_runtime! {
|
||||
67 | | pub struct Runtime
|
||||
68 | | {
|
||||
69 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
70 | | Pallet: pallet expanded::{}::{Pallet, Origin},
|
||||
71 | | }
|
||||
72 | | }
|
||||
| |_^ not found in `pallet`
|
||||
|
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
+2
-1
@@ -15,7 +15,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use frame_support::construct_runtime;
|
||||
use frame_support::{construct_runtime, derive_impl};
|
||||
use sp_core::sr25519;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
|
||||
@@ -36,6 +36,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Sign
|
||||
|
||||
impl pallet::Config for Runtime {}
|
||||
|
||||
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
|
||||
+29
-29
@@ -4,46 +4,46 @@ error: `Pallet` does not have #[pallet::validate_unsigned] defined, perhaps you
|
||||
22 | #[frame_support::pallet]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
...
|
||||
65 | / construct_runtime! {
|
||||
66 | | pub struct Runtime
|
||||
67 | | {
|
||||
68 | | System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
69 | | Pallet: pallet::{Pallet, ValidateUnsigned},
|
||||
70 | | }
|
||||
71 | | }
|
||||
66 | / construct_runtime! {
|
||||
67 | | pub struct Runtime
|
||||
68 | | {
|
||||
69 | | System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
70 | | Pallet: pallet::{Pallet, ValidateUnsigned},
|
||||
71 | | }
|
||||
72 | | }
|
||||
| |_- in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `pallet::__substrate_validate_unsigned_check::is_validate_unsigned_part_defined` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0599]: no variant or associated item named `Pallet` found for enum `RuntimeCall` in the current scope
|
||||
--> tests/construct_runtime_ui/undefined_validate_unsigned_part.rs:69:3
|
||||
--> tests/construct_runtime_ui/undefined_validate_unsigned_part.rs:70:3
|
||||
|
|
||||
65 | // construct_runtime! {
|
||||
66 | || pub struct Runtime
|
||||
67 | || {
|
||||
68 | || System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
69 | || Pallet: pallet::{Pallet, ValidateUnsigned},
|
||||
66 | // construct_runtime! {
|
||||
67 | || pub struct Runtime
|
||||
68 | || {
|
||||
69 | || System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
70 | || Pallet: pallet::{Pallet, ValidateUnsigned},
|
||||
| || -^^^^^^ variant or associated item not found in `RuntimeCall`
|
||||
| ||________|
|
||||
| |
|
||||
... |
|
||||
|
||||
error[E0599]: no function or associated item named `pre_dispatch` found for struct `pallet::Pallet` in the current scope
|
||||
--> tests/construct_runtime_ui/undefined_validate_unsigned_part.rs:65:1
|
||||
--> tests/construct_runtime_ui/undefined_validate_unsigned_part.rs:66:1
|
||||
|
|
||||
28 | pub struct Pallet<T>(_);
|
||||
| -------------------- function or associated item `pre_dispatch` not found for this struct
|
||||
...
|
||||
65 | construct_runtime! {
|
||||
66 | construct_runtime! {
|
||||
| __^
|
||||
| | _|
|
||||
| ||
|
||||
66 | || pub struct Runtime
|
||||
67 | || {
|
||||
68 | || System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
69 | || Pallet: pallet::{Pallet, ValidateUnsigned},
|
||||
70 | || }
|
||||
71 | || }
|
||||
67 | || pub struct Runtime
|
||||
68 | || {
|
||||
69 | || System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
70 | || Pallet: pallet::{Pallet, ValidateUnsigned},
|
||||
71 | || }
|
||||
72 | || }
|
||||
| ||_- in this macro invocation
|
||||
... |
|
||||
|
|
||||
@@ -54,21 +54,21 @@ error[E0599]: no function or associated item named `pre_dispatch` found for stru
|
||||
= note: this error originates in the macro `frame_support::construct_runtime` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0599]: no function or associated item named `validate_unsigned` found for struct `pallet::Pallet` in the current scope
|
||||
--> tests/construct_runtime_ui/undefined_validate_unsigned_part.rs:65:1
|
||||
--> tests/construct_runtime_ui/undefined_validate_unsigned_part.rs:66:1
|
||||
|
|
||||
28 | pub struct Pallet<T>(_);
|
||||
| -------------------- function or associated item `validate_unsigned` not found for this struct
|
||||
...
|
||||
65 | construct_runtime! {
|
||||
66 | construct_runtime! {
|
||||
| __^
|
||||
| | _|
|
||||
| ||
|
||||
66 | || pub struct Runtime
|
||||
67 | || {
|
||||
68 | || System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
69 | || Pallet: pallet::{Pallet, ValidateUnsigned},
|
||||
70 | || }
|
||||
71 | || }
|
||||
67 | || pub struct Runtime
|
||||
68 | || {
|
||||
69 | || System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
70 | || Pallet: pallet::{Pallet, ValidateUnsigned},
|
||||
71 | || }
|
||||
72 | || }
|
||||
| ||_- in this macro invocation
|
||||
... |
|
||||
|
|
||||
|
||||
Reference in New Issue
Block a user