Moves Block to frame_system instead of construct_runtime and removes Header and BlockNumber (#14437)

* Initial setup

* Adds node block

* Uses UncheckedExtrinsic and removes Where section

* Updates frame_system to use Block

* Adds deprecation warning

* Fixes pallet-timestamp

* Removes Header and BlockNumber

* Addresses review comments

* Addresses review comments

* Adds comment about compiler bug

* Removes where clause

* Refactors code

* Fixes errors in cargo check

* Fixes errors in cargo check

* Fixes warnings in cargo check

* Formatting

* Fixes construct_runtime tests

* Uses import instead of full path for BlockNumber

* Uses import instead of full path for Header

* Formatting

* Fixes construct_runtime tests

* Fixes imports in benchmarks

* Formatting

* Fixes construct_runtime tests

* Formatting

* Minor updates

* Fixes construct_runtime ui tests

* Fixes construct_runtime ui tests with 1.70

* Fixes docs

* Fixes docs

* Adds u128 mock block type

* Fixes split example

* fixes for cumulus

* ".git/.scripts/commands/fmt/fmt.sh"

* Updates new tests

* Fixes fully-qualified path in few places

* Formatting

* Update frame/examples/default-config/src/lib.rs

Co-authored-by: Juan <juangirini@gmail.com>

* Update frame/support/procedural/src/construct_runtime/mod.rs

Co-authored-by: Juan <juangirini@gmail.com>

* ".git/.scripts/commands/fmt/fmt.sh"

* Addresses some review comments

* Fixes build

* ".git/.scripts/commands/fmt/fmt.sh"

* Update frame/democracy/src/lib.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update frame/democracy/src/lib.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update frame/support/procedural/src/construct_runtime/mod.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update frame/support/procedural/src/construct_runtime/mod.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Addresses review comments

* Updates trait bounds

* Minor fix

* ".git/.scripts/commands/fmt/fmt.sh"

* Removes unnecessary bound

* ".git/.scripts/commands/fmt/fmt.sh"

* Updates test

* Fixes build

* Adds a bound for header

* ".git/.scripts/commands/fmt/fmt.sh"

* Removes where block

* Minor fix

* Minor fix

* Fixes tests

* ".git/.scripts/commands/update-ui/update-ui.sh" 1.70

* Updates test

* Update primitives/runtime/src/traits.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

* Update primitives/runtime/src/traits.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

* Updates doc

* Updates doc

---------

Co-authored-by: command-bot <>
Co-authored-by: Juan <juangirini@gmail.com>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
gupnik
2023-07-13 17:31:34 +05:30
committed by GitHub
parent e42a669c50
commit 5e7b27e98c
277 changed files with 2017 additions and 2450 deletions
@@ -20,12 +20,9 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Sign
impl pallet::Config for Runtime {}
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: system::{Pallet, Call, Storage, Config, Event<T>},
System: system::{Pallet, Call, Storage, Config<T>, Event<T>},
Pallet: pallet exclude_parts { Pallet } use_parts { Pallet },
}
}
@@ -1,7 +1,7 @@
error: Unexpected tokens, expected one of `=`, `,`
--> tests/construct_runtime_ui/both_use_and_excluded_parts.rs:29:43
--> tests/construct_runtime_ui/both_use_and_excluded_parts.rs:26:43
|
29 | Pallet: pallet exclude_parts { Pallet } use_parts { Pallet },
26 | Pallet: pallet exclude_parts { Pallet } use_parts { Pallet },
| ^^^^^^^^^
error[E0412]: cannot find type `RuntimeCall` in this scope
@@ -1,10 +1,7 @@
use frame_support::construct_runtime;
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: system::{Pallet},
Balance: balances::{Pallet},
@@ -1,11 +1,11 @@
error: Two pallets with the same name!
--> $DIR/conflicting_module_name.rs:10:3
|
10 | Balance: balances::{Pallet},
| ^^^^^^^
--> tests/construct_runtime_ui/conflicting_module_name.rs:7:3
|
7 | Balance: balances::{Pallet},
| ^^^^^^^
error: Two pallets with the same name!
--> $DIR/conflicting_module_name.rs:11:3
|
11 | Balance: balances::{Pallet},
| ^^^^^^^
--> tests/construct_runtime_ui/conflicting_module_name.rs:8:3
|
8 | Balance: balances::{Pallet},
| ^^^^^^^
@@ -0,0 +1,13 @@
use frame_support::construct_runtime;
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = Uxt,
{
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
}
}
fn main() {}
@@ -0,0 +1,442 @@
error: use of deprecated constant `WhereSection::_w`:
It is deprecated to use a `where` clause in `construct_runtime`.
Please instead use `frame_system::Config` to set the `Block` type and delete this clause.
It is planned to be removed in December 2023.
For more info see:
<https://github.com/paritytech/substrate/pull/14437>
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | / construct_runtime! {
4 | | pub struct Runtime where
5 | | Block = Block,
6 | | NodeBlock = Block,
... |
10 | | }
11 | | }
| |_^
|
= note: `-D deprecated` implied by `-D warnings`
= note: this error originates in the macro `frame_support::match_and_insert` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Runtime: Config` is not satisfied
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
|
note: required by a bound in `frame_system::Event`
--> $WORKSPACE/frame/system/src/lib.rs
|
| pub enum Event<T: Config> {
| ^^^^^^ required by this bound in `Event`
= 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[E0277]: the trait bound `Runtime: Config` is not satisfied in `RuntimeEvent`
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
|
note: required because it appears within the type `RuntimeEvent`
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
note: required by a bound in `Clone`
--> $RUST/core/src/clone.rs
|
| pub trait Clone: Sized {
| ^^^^^ required by this bound in `Clone`
= note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Runtime: Config` is not satisfied in `RuntimeEvent`
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
|
note: required because it appears within the type `RuntimeEvent`
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
note: required by a bound in `EncodeLike`
--> $CARGO/parity-scale-codec-3.6.1/src/encode_like.rs
|
| pub trait EncodeLike<T: Encode = Self>: Sized + Encode {}
| ^^^^^ required by this bound in `EncodeLike`
= 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[E0277]: the trait bound `Runtime: Config` is not satisfied in `RuntimeEvent`
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
|
note: required because it appears within the type `RuntimeEvent`
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
note: required by a bound in `Decode`
--> $CARGO/parity-scale-codec-3.6.1/src/codec.rs
|
| pub trait Decode: Sized {
| ^^^^^ required by this bound in `Decode`
= 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[E0277]: the trait bound `Runtime: Config` is not satisfied in `frame_system::Event<Runtime>`
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
|
= note: required because it appears within the type `Event<Runtime>`
note: required by a bound in `From`
--> $RUST/core/src/convert/mod.rs
|
| pub trait From<T>: Sized {
| ^ required by this bound in `From`
= 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[E0277]: the trait bound `Runtime: Config` is not satisfied in `frame_system::Event<Runtime>`
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
|
= note: required because it appears within the type `Event<Runtime>`
note: required by a bound in `TryInto`
--> $RUST/core/src/convert/mod.rs
|
| pub trait TryInto<T>: Sized {
| ^ required by this bound in `TryInto`
= 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[E0277]: the trait bound `Runtime: Config` is not satisfied
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
|
= 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[E0277]: the trait bound `Runtime: Config` is not satisfied
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | construct_runtime! {
| ^ the trait `Config` is not implemented for `Runtime`
|
= 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[E0277]: the trait bound `RawOrigin<_>: TryFrom<OriginCaller>` is not satisfied
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
|
= help: the trait `TryFrom<OriginCaller>` is implemented for `RawOrigin<<Runtime as Config>::AccountId>`
= 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[E0277]: the trait bound `Runtime: Config` is not satisfied
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
|
= help: the trait `Callable<T>` is implemented for `Pallet<T>`
= note: required for `Pallet<Runtime>` to implement `Callable<Runtime>`
= 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[E0277]: the trait bound `Runtime: Config` is not satisfied
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
|
= note: required for `Pallet<Runtime>` to implement `Callable<Runtime>`
note: required because it appears within the type `RuntimeCall`
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
note: required by a bound in `Clone`
--> $RUST/core/src/clone.rs
|
| pub trait Clone: Sized {
| ^^^^^ required by this bound in `Clone`
= note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Runtime: Config` is not satisfied
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
|
= note: required for `Pallet<Runtime>` to implement `Callable<Runtime>`
note: required because it appears within the type `RuntimeCall`
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
note: required by a bound in `EncodeLike`
--> $CARGO/parity-scale-codec-3.6.1/src/encode_like.rs
|
| pub trait EncodeLike<T: Encode = Self>: Sized + Encode {}
| ^^^^^ required by this bound in `EncodeLike`
= 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[E0277]: the trait bound `Runtime: Config` is not satisfied
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
|
= note: required for `Pallet<Runtime>` to implement `Callable<Runtime>`
note: required because it appears within the type `RuntimeCall`
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
note: required by a bound in `Decode`
--> $CARGO/parity-scale-codec-3.6.1/src/codec.rs
|
| pub trait Decode: Sized {
| ^^^^^ required by this bound in `Decode`
= 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[E0277]: the trait bound `Runtime: Config` is not satisfied
--> tests/construct_runtime_ui/deprecated_where_block.rs:9:3
|
9 | System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
| ^^^^^^ the trait `Config` is not implemented for `Runtime`
|
note: required by a bound in `frame_system::GenesisConfig`
--> $WORKSPACE/frame/system/src/lib.rs
|
| pub struct GenesisConfig<T: Config> {
| ^^^^^^ required by this bound in `GenesisConfig`
error[E0277]: the trait bound `Runtime: Config` is not satisfied in `RuntimeEvent`
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
|
note: required because it appears within the type `RuntimeEvent`
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
note: required by a bound in `Result`
--> $RUST/core/src/result.rs
|
| pub enum Result<T, E> {
| ^ required by this bound in `Result`
= note: this error originates in the derive macro `self::sp_api_hidden_includes_construct_runtime::hidden_include::codec::Decode` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Runtime: Config` is not satisfied in `RuntimeEvent`
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
|
note: required because it appears within the type `RuntimeEvent`
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
note: required by a bound in `TryInto`
--> $RUST/core/src/convert/mod.rs
|
| pub trait TryInto<T>: Sized {
| ^^^^^ required by this bound in `TryInto`
= 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[E0277]: the trait bound `Runtime: Config` is not satisfied
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
|
= note: required for `Pallet<Runtime>` to implement `Callable<Runtime>`
note: required because it appears within the type `RuntimeCall`
--> tests/construct_runtime_ui/deprecated_where_block.rs:3:1
|
3 | // construct_runtime! {
4 | || pub struct Runtime where
5 | || Block = Block,
6 | || NodeBlock = Block,
... ||
10 | || }
11 | || }
| ||_- in this macro invocation
... |
note: required by a bound in `Result`
--> $RUST/core/src/result.rs
|
| pub enum Result<T, E> {
| ^ required by this bound in `Result`
= note: this error originates in the derive macro `self::sp_api_hidden_includes_construct_runtime::hidden_include::codec::Decode` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -1,10 +1,7 @@
use frame_support::construct_runtime;
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: system::{Pallet},
Balance: balances::{Config, Call, Config<T>, Origin<T>},
@@ -1,5 +1,5 @@
error: `Config` was already declared before. Please remove the duplicate declaration
--> $DIR/double_module_parts.rs:10:37
|
10 | Balance: balances::{Config, Call, Config<T>, Origin<T>},
| ^^^^^^
--> tests/construct_runtime_ui/double_module_parts.rs:7:37
|
7 | Balance: balances::{Config, Call, Config<T>, Origin<T>},
| ^^^^^^
@@ -1,10 +1,7 @@
use frame_support::construct_runtime;
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
system: ,
}
@@ -1,5 +1,5 @@
error: expected one of: `crate`, `self`, `super`, identifier
--> $DIR/empty_pallet_path.rs:9:11
--> tests/construct_runtime_ui/empty_pallet_path.rs:6:11
|
9 | system: ,
6 | system: ,
| ^
@@ -25,12 +25,9 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Sign
impl pallet::Config for Runtime {}
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: system::{Pallet, Call, Storage, Config, Event<T>},
System: system::{Pallet, Call, Storage, Config<T>, Event<T>},
Pallet: pallet exclude_parts { Call },
}
}
@@ -1,7 +1,7 @@
error: Invalid pallet part specified, the pallet `Pallet` doesn't have the `Call` part. Available parts are: `Pallet`, `Storage`.
--> tests/construct_runtime_ui/exclude_undefined_part.rs:34:34
--> tests/construct_runtime_ui/exclude_undefined_part.rs:31:34
|
34 | Pallet: pallet exclude_parts { Call },
31 | Pallet: pallet exclude_parts { Call },
| ^^^^
error[E0412]: cannot find type `RuntimeCall` in this scope
@@ -1,10 +1,7 @@
use frame_support::construct_runtime;
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
#[cfg(test)]
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
@@ -1,5 +1,5 @@
error: `System` pallet declaration is feature gated, please remove any `#[cfg]` attributes
--> tests/construct_runtime_ui/feature_gated_system_pallet.rs:10:3
|
10 | System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
| ^^^^^^
--> tests/construct_runtime_ui/feature_gated_system_pallet.rs:7:3
|
7 | System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
| ^^^^^^
@@ -1,10 +1,7 @@
use frame_support::construct_runtime;
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: system::{Pallet},
Balance: balances::<Instance1>::{Call<T>, Origin<T>},
@@ -1,5 +1,5 @@
error: `Call` is not allowed to have generics. Only the following pallets are allowed to have generics: `Event`, `Error`, `Origin`, `Config`.
--> $DIR/generics_in_invalid_module.rs:10:36
|
10 | Balance: balances::<Instance1>::{Call<T>, Origin<T>},
| ^^^^
--> tests/construct_runtime_ui/generics_in_invalid_module.rs:7:36
|
7 | Balance: balances::<Instance1>::{Call<T>, Origin<T>},
| ^^^^
@@ -1,10 +1,7 @@
use frame_support::construct_runtime;
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: system::{Pallet},
#[cfg(feature = 1)]
@@ -1,6 +1,6 @@
error: feature = 1
^ expected one of `<key>`, `all`, `any`, `not` here
--> tests/construct_runtime_ui/invalid_meta_literal.rs:10:3
|
10 | #[cfg(feature = 1)]
| ^
--> tests/construct_runtime_ui/invalid_meta_literal.rs:7:3
|
7 | #[cfg(feature = 1)]
| ^
@@ -1,10 +1,7 @@
use frame_support::construct_runtime;
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
system: System::(),
}
@@ -1,5 +1,5 @@
error: Unexpected tokens, expected one of `::$ident` `::{`, `exclude_parts`, `use_parts`, `=`, `,`
--> tests/construct_runtime_ui/invalid_module_details.rs:9:17
--> tests/construct_runtime_ui/invalid_module_details.rs:6:17
|
9 | system: System::(),
6 | system: System::(),
| ^
@@ -1,10 +1,7 @@
use frame_support::construct_runtime;
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
system: System::{enum},
}
@@ -1,5 +1,5 @@
error: expected one of: `Pallet`, `Call`, `Storage`, `Event`, `Error`, `Config`, `Origin`, `Inherent`, `ValidateUnsigned`, `FreezeReason`, `HoldReason`, `LockId`, `SlashReason`
--> $DIR/invalid_module_details_keyword.rs:9:20
--> tests/construct_runtime_ui/invalid_module_details_keyword.rs:6:20
|
9 | system: System::{enum},
6 | system: System::{enum},
| ^^^^
@@ -1,10 +1,7 @@
use frame_support::construct_runtime;
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: system::{Pallet},
Balance: balances::{Unexpected},
@@ -1,5 +1,5 @@
error: expected one of: `Pallet`, `Call`, `Storage`, `Event`, `Error`, `Config`, `Origin`, `Inherent`, `ValidateUnsigned`, `FreezeReason`, `HoldReason`, `LockId`, `SlashReason`
--> $DIR/invalid_module_entry.rs:10:23
|
10 | Balance: balances::{Unexpected},
| ^^^^^^^^^^
--> tests/construct_runtime_ui/invalid_module_entry.rs:7:23
|
7 | Balance: balances::{Unexpected},
| ^^^^^^^^^^
@@ -1,10 +1,7 @@
use frame_support::construct_runtime;
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
system: System ?
}
@@ -1,5 +1,5 @@
error: Unexpected tokens, expected one of `::$ident` `::{`, `exclude_parts`, `use_parts`, `=`, `,`
--> $DIR/invalid_token_after_module.rs:9:18
--> tests/construct_runtime_ui/invalid_token_after_module.rs:6:18
|
9 | system: System ?
6 | system: System ?
| ^
@@ -1,10 +1,7 @@
use frame_support::construct_runtime;
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
system ?
}
@@ -1,5 +1,5 @@
error: expected `:`
--> $DIR/invalid_token_after_name.rs:9:10
--> tests/construct_runtime_ui/invalid_token_after_name.rs:6:10
|
9 | system ?
6 | system ?
| ^
@@ -1,10 +1,7 @@
use frame_support::construct_runtime;
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: system expanded::{}::{Pallet},
Balance: balances::<Instance1> expanded::{}::{Event},
@@ -1,5 +1,5 @@
error: Instantiable pallet with no generic `Event` cannot be constructed: pallet `Balance` must have generic `Event`
--> $DIR/missing_event_generic_on_module_with_instance.rs:10:3
|
10 | Balance: balances::<Instance1> expanded::{}::{Event},
| ^^^^^^^
--> tests/construct_runtime_ui/missing_event_generic_on_module_with_instance.rs:7:3
|
7 | Balance: balances::<Instance1> expanded::{}::{Event},
| ^^^^^^^
@@ -1,10 +1,7 @@
use frame_support::construct_runtime;
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
system: System::<>,
}
@@ -1,5 +1,5 @@
error: expected identifier
--> $DIR/missing_module_instance.rs:9:20
--> tests/construct_runtime_ui/missing_module_instance.rs:6:20
|
9 | system: System::<>,
6 | system: System::<>,
| ^
@@ -1,10 +1,7 @@
use frame_support::construct_runtime;
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: system expanded::{}::{Pallet},
Balance: balances::<Instance1> expanded::{}::{Origin},
@@ -1,5 +1,5 @@
error: Instantiable pallet with no generic `Origin` cannot be constructed: pallet `Balance` must have generic `Origin`
--> $DIR/missing_origin_generic_on_module_with_instance.rs:10:3
|
10 | Balance: balances::<Instance1> expanded::{}::{Origin},
| ^^^^^^^
--> tests/construct_runtime_ui/missing_origin_generic_on_module_with_instance.rs:7:3
|
7 | Balance: balances::<Instance1> expanded::{}::{Origin},
| ^^^^^^^
@@ -1,10 +1,7 @@
use frame_support::construct_runtime;
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
}
}
@@ -1,6 +1,6 @@
error: `System` pallet declaration is missing. Please add this line: `System: frame_system::{Pallet, Call, Storage, Config, Event<T>},`
--> $DIR/missing_system_module.rs:8:2
error: `System` pallet declaration is missing. Please add this line: `System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},`
--> tests/construct_runtime_ui/missing_system_module.rs:5:2
|
8 | / {
9 | | }
5 | / {
6 | | }
| |_____^
@@ -1,7 +0,0 @@
use frame_support::construct_runtime;
construct_runtime! {
pub struct Runtime {}
}
fn main() {}
@@ -1,5 +0,0 @@
error: expected `where`
--> tests/construct_runtime_ui/missing_where_block.rs:4:21
|
4 | pub struct Runtime {}
| ^
@@ -23,13 +23,12 @@ impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything;
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type BlockNumber = u32;
type RuntimeCall = RuntimeCall;
type Hash = sp_runtime::testing::H256;
type Hashing = sp_runtime::traits::BlakeTwo256;
type AccountId = u64;
type Lookup = sp_runtime::traits::IdentityLookup<Self::AccountId>;
type Header = Header;
type Block = Block;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = frame_support::traits::ConstU32<250>;
type BlockWeights = ();
@@ -47,10 +46,7 @@ impl frame_system::Config for Runtime {
}
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
Pallet1: pallet::{Pallet},
@@ -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:50:2
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:49:2
|
50 | pub struct Runtime where
49 | pub struct Runtime
| ^^^
error[E0412]: cannot find type `RuntimeCall` in this scope
@@ -34,26 +34,26 @@ error[E0412]: cannot find type `RuntimeOrigin` in this scope
| ^^^^^^^^^^^^^ 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:27:21
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:26:21
|
27 | type RuntimeCall = RuntimeCall;
26 | 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:33:22
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:32:22
|
33 | type RuntimeEvent = RuntimeEvent;
32 | 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:39:20
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:38:20
|
39 | type PalletInfo = PalletInfo;
38 | type PalletInfo = PalletInfo;
| ^^^^^^^^^^
|
help: you might have meant to use the associated type
|
39 | type PalletInfo = Self::PalletInfo;
38 | type PalletInfo = Self::PalletInfo;
| ~~~~~~~~~~~~~~~~
help: consider importing this trait
|
@@ -48,13 +48,12 @@ impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything;
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type BlockNumber = u32;
type RuntimeCall = RuntimeCall;
type Hash = sp_runtime::testing::H256;
type Hashing = sp_runtime::traits::BlakeTwo256;
type AccountId = u64;
type Lookup = sp_runtime::traits::IdentityLookup<Self::AccountId>;
type Header = Header;
type Block = Block;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = frame_support::traits::ConstU32<250>;
type BlockWeights = ();
@@ -72,10 +71,7 @@ impl frame_system::Config for Runtime {
}
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
Pallet: pallet::{Pallet},
@@ -1,13 +1,13 @@
error[E0080]: evaluation of constant value failed
--> tests/construct_runtime_ui/pallet_error_too_large.rs:74:1
--> tests/construct_runtime_ui/pallet_error_too_large.rs:73:1
|
74 | / construct_runtime! {
75 | | pub struct Runtime where
76 | | Block = Block,
77 | | NodeBlock = Block,
... |
82 | | }
83 | | }
| |_^ 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:74:1
73 | / construct_runtime! {
74 | | pub struct Runtime
75 | | {
76 | | System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
77 | | Pallet: pallet::{Pallet},
78 | | }
79 | | }
| |_^ 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:73: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)
@@ -23,13 +23,12 @@ impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything;
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type BlockNumber = u32;
type RuntimeCall = RuntimeCall;
type Hash = sp_runtime::testing::H256;
type Hashing = sp_runtime::traits::BlakeTwo256;
type AccountId = u64;
type Lookup = sp_runtime::traits::IdentityLookup<Self::AccountId>;
type Header = Header;
type Block = Block;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = frame_support::traits::ConstU32<250>;
type BlockWeights = ();
@@ -47,10 +46,7 @@ impl frame_system::Config for Runtime {
}
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
Pallet: pallet::{Pallet, Call},
@@ -4,13 +4,13 @@ error: `Pallet` does not have #[pallet::call] defined, perhaps you should remove
5 | #[frame_support::pallet]
| ^^^^^^^^^^^^^^^^^^^^^^^^
...
49 | / construct_runtime! {
50 | | pub struct Runtime where
51 | | Block = Block,
52 | | NodeBlock = Block,
... |
57 | | }
58 | | }
48 | / construct_runtime! {
49 | | pub struct Runtime
50 | | {
51 | | System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
52 | | Pallet: pallet::{Pallet, Call},
53 | | }
54 | | }
| |_- 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)
@@ -23,13 +23,12 @@ impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything;
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type BlockNumber = u32;
type RuntimeCall = RuntimeCall;
type Hash = sp_runtime::testing::H256;
type Hashing = sp_runtime::traits::BlakeTwo256;
type AccountId = u64;
type Lookup = sp_runtime::traits::IdentityLookup<Self::AccountId>;
type Header = Header;
type Block = Block;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = frame_support::traits::ConstU32<250>;
type BlockWeights = ();
@@ -47,10 +46,7 @@ impl frame_system::Config for Runtime {
}
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
Pallet: pallet expanded::{}::{Pallet, Event},
@@ -4,27 +4,27 @@ error: `Pallet` does not have #[pallet::event] defined, perhaps you should remov
5 | #[frame_support::pallet]
| ^^^^^^^^^^^^^^^^^^^^^^^^
...
49 | / construct_runtime! {
50 | | pub struct Runtime where
51 | | Block = Block,
52 | | NodeBlock = Block,
... |
57 | | }
58 | | }
48 | / construct_runtime! {
49 | | pub struct Runtime
50 | | {
51 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
52 | | Pallet: pallet expanded::{}::{Pallet, Event},
53 | | }
54 | | }
| |_- 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:49:1
--> tests/construct_runtime_ui/undefined_event_part.rs:48:1
|
49 | / construct_runtime! {
50 | | pub struct Runtime where
51 | | Block = Block,
52 | | NodeBlock = Block,
... |
57 | | }
58 | | }
48 | / construct_runtime! {
49 | | pub struct Runtime
50 | | {
51 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
52 | | Pallet: pallet expanded::{}::{Pallet, Event},
53 | | }
54 | | }
| |_^ not found in `pallet`
|
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -23,13 +23,12 @@ impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything;
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type BlockNumber = u32;
type RuntimeCall = RuntimeCall;
type Hash = sp_runtime::testing::H256;
type Hashing = sp_runtime::traits::BlakeTwo256;
type AccountId = u64;
type Lookup = sp_runtime::traits::IdentityLookup<Self::AccountId>;
type Header = Header;
type Block = Block;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = frame_support::traits::ConstU32<250>;
type BlockWeights = ();
@@ -47,10 +46,7 @@ impl frame_system::Config for Runtime {
}
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
Pallet: pallet expanded::{}::{Pallet, Config},
@@ -4,27 +4,27 @@ error: `Pallet` does not have #[pallet::genesis_config] defined, perhaps you sho
5 | #[frame_support::pallet]
| ^^^^^^^^^^^^^^^^^^^^^^^^
...
49 | / construct_runtime! {
50 | | pub struct Runtime where
51 | | Block = Block,
52 | | NodeBlock = Block,
... |
57 | | }
58 | | }
48 | / construct_runtime! {
49 | | pub struct Runtime
50 | | {
51 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
52 | | Pallet: pallet expanded::{}::{Pallet, Config},
53 | | }
54 | | }
| |_- 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:49:1
--> tests/construct_runtime_ui/undefined_genesis_config_part.rs:48:1
|
49 | / construct_runtime! {
50 | | pub struct Runtime where
51 | | Block = Block,
52 | | NodeBlock = Block,
... |
57 | | }
58 | | }
48 | / construct_runtime! {
49 | | pub struct Runtime
50 | | {
51 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
52 | | Pallet: pallet expanded::{}::{Pallet, Config},
53 | | }
54 | | }
| |_^ not found in `pallet`
|
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -23,13 +23,12 @@ impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything;
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type BlockNumber = u32;
type RuntimeCall = RuntimeCall;
type Hash = sp_runtime::testing::H256;
type Hashing = sp_runtime::traits::BlakeTwo256;
type AccountId = u64;
type Lookup = sp_runtime::traits::IdentityLookup<Self::AccountId>;
type Header = Header;
type Block = Block;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = frame_support::traits::ConstU32<250>;
type BlockWeights = ();
@@ -47,10 +46,7 @@ impl frame_system::Config for Runtime {
}
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
Pallet: pallet expanded::{}::{Pallet, Inherent},
@@ -4,31 +4,31 @@ error: `Pallet` does not have #[pallet::inherent] defined, perhaps you should re
5 | #[frame_support::pallet]
| ^^^^^^^^^^^^^^^^^^^^^^^^
...
49 | / construct_runtime! {
50 | | pub struct Runtime where
51 | | Block = Block,
52 | | NodeBlock = Block,
... |
57 | | }
58 | | }
48 | / construct_runtime! {
49 | | pub struct Runtime
50 | | {
51 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
52 | | Pallet: pallet expanded::{}::{Pallet, Inherent},
53 | | }
54 | | }
| |_- 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:49:1
--> tests/construct_runtime_ui/undefined_inherent_part.rs:48:1
|
11 | pub struct Pallet<T>(_);
| -------------------- function or associated item `create_inherent` not found for this struct
...
49 | construct_runtime! {
48 | construct_runtime! {
| _^
50 | | pub struct Runtime where
51 | | Block = Block,
52 | | NodeBlock = Block,
... |
57 | | }
58 | | }
49 | | pub struct Runtime
50 | | {
51 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
52 | | Pallet: pallet expanded::{}::{Pallet, Inherent},
53 | | }
54 | | }
| |_^ 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:49:1
--> tests/construct_runtime_ui/undefined_inherent_part.rs:48:1
|
11 | pub struct Pallet<T>(_);
| -------------------- function or associated item `is_inherent` not found for this struct
...
49 | construct_runtime! {
48 | construct_runtime! {
| _^
50 | | pub struct Runtime where
51 | | Block = Block,
52 | | NodeBlock = Block,
... |
57 | | }
58 | | }
49 | | pub struct Runtime
50 | | {
51 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
52 | | Pallet: pallet expanded::{}::{Pallet, Inherent},
53 | | }
54 | | }
| |_^ 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:49:1
--> tests/construct_runtime_ui/undefined_inherent_part.rs:48:1
|
11 | pub struct Pallet<T>(_);
| -------------------- function or associated item `check_inherent` not found for this struct
...
49 | construct_runtime! {
48 | construct_runtime! {
| _^
50 | | pub struct Runtime where
51 | | Block = Block,
52 | | NodeBlock = Block,
... |
57 | | }
58 | | }
49 | | pub struct Runtime
50 | | {
51 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
52 | | Pallet: pallet expanded::{}::{Pallet, Inherent},
53 | | }
54 | | }
| |_^ 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:49:1
--> tests/construct_runtime_ui/undefined_inherent_part.rs:48:1
|
11 | pub struct Pallet<T>(_);
| -------------------- associated item `INHERENT_IDENTIFIER` not found for this struct
...
49 | construct_runtime! {
48 | construct_runtime! {
| _^
50 | | pub struct Runtime where
51 | | Block = Block,
52 | | NodeBlock = Block,
... |
57 | | }
58 | | }
49 | | pub struct Runtime
50 | | {
51 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
52 | | Pallet: pallet expanded::{}::{Pallet, Inherent},
53 | | }
54 | | }
| |_^ 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:49:1
--> tests/construct_runtime_ui/undefined_inherent_part.rs:48:1
|
11 | pub struct Pallet<T>(_);
| -------------------- function or associated item `is_inherent_required` not found for this struct
...
49 | construct_runtime! {
48 | construct_runtime! {
| _^
50 | | pub struct Runtime where
51 | | Block = Block,
52 | | NodeBlock = Block,
... |
57 | | }
58 | | }
49 | | pub struct Runtime
50 | | {
51 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
52 | | Pallet: pallet expanded::{}::{Pallet, Inherent},
53 | | }
54 | | }
| |_^ 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
@@ -23,13 +23,12 @@ impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything;
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type BlockNumber = u32;
type RuntimeCall = RuntimeCall;
type Hash = sp_runtime::testing::H256;
type Hashing = sp_runtime::traits::BlakeTwo256;
type AccountId = u64;
type Lookup = sp_runtime::traits::IdentityLookup<Self::AccountId>;
type Header = Header;
type Block = Block;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = frame_support::traits::ConstU32<250>;
type BlockWeights = ();
@@ -47,10 +46,7 @@ impl frame_system::Config for Runtime {
}
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
Pallet: pallet expanded::{}::{Pallet, Origin},
@@ -4,27 +4,27 @@ error: `Pallet` does not have #[pallet::origin] defined, perhaps you should remo
5 | #[frame_support::pallet]
| ^^^^^^^^^^^^^^^^^^^^^^^^
...
49 | / construct_runtime! {
50 | | pub struct Runtime where
51 | | Block = Block,
52 | | NodeBlock = Block,
... |
57 | | }
58 | | }
48 | / construct_runtime! {
49 | | pub struct Runtime
50 | | {
51 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
52 | | Pallet: pallet expanded::{}::{Pallet, Origin},
53 | | }
54 | | }
| |_- 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:49:1
--> tests/construct_runtime_ui/undefined_origin_part.rs:48:1
|
49 | / construct_runtime! {
50 | | pub struct Runtime where
51 | | Block = Block,
52 | | NodeBlock = Block,
... |
57 | | }
58 | | }
48 | / construct_runtime! {
49 | | pub struct Runtime
50 | | {
51 | | System: frame_system expanded::{}::{Pallet, Call, Storage, Config<T>, Event<T>},
52 | | Pallet: pallet expanded::{}::{Pallet, Origin},
53 | | }
54 | | }
| |_^ not found in `pallet`
|
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -23,13 +23,12 @@ impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything;
type RuntimeOrigin = RuntimeOrigin;
type Index = u64;
type BlockNumber = u32;
type RuntimeCall = RuntimeCall;
type Hash = sp_runtime::testing::H256;
type Hashing = sp_runtime::traits::BlakeTwo256;
type AccountId = u64;
type Lookup = sp_runtime::traits::IdentityLookup<Self::AccountId>;
type Header = Header;
type Block = Block;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = frame_support::traits::ConstU32<250>;
type BlockWeights = ();
@@ -47,10 +46,7 @@ impl frame_system::Config for Runtime {
}
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
Pallet: pallet::{Pallet, ValidateUnsigned},
@@ -4,48 +4,46 @@ error: `Pallet` does not have #[pallet::validate_unsigned] defined, perhaps you
5 | #[frame_support::pallet]
| ^^^^^^^^^^^^^^^^^^^^^^^^
...
49 | / construct_runtime! {
50 | | pub struct Runtime where
51 | | Block = Block,
52 | | NodeBlock = Block,
... |
57 | | }
58 | | }
48 | / construct_runtime! {
49 | | pub struct Runtime
50 | | {
51 | | System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
52 | | Pallet: pallet::{Pallet, ValidateUnsigned},
53 | | }
54 | | }
| |_- 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:56:3
--> tests/construct_runtime_ui/undefined_validate_unsigned_part.rs:52:3
|
49 | // construct_runtime! {
50 | || pub struct Runtime where
51 | || Block = Block,
52 | || NodeBlock = Block,
... ||
55 | || System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
56 | || Pallet: pallet::{Pallet, ValidateUnsigned},
48 | // construct_runtime! {
49 | || pub struct Runtime
50 | || {
51 | || System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
52 | || 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:49:1
--> tests/construct_runtime_ui/undefined_validate_unsigned_part.rs:48:1
|
11 | pub struct Pallet<T>(_);
| -------------------- function or associated item `pre_dispatch` not found for this struct
...
49 | construct_runtime! {
48 | construct_runtime! {
| __^
| | _|
| ||
50 | || pub struct Runtime where
51 | || Block = Block,
52 | || NodeBlock = Block,
... ||
57 | || }
58 | || }
49 | || pub struct Runtime
50 | || {
51 | || System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
52 | || Pallet: pallet::{Pallet, ValidateUnsigned},
53 | || }
54 | || }
| ||_- in this macro invocation
... |
|
@@ -56,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:49:1
--> tests/construct_runtime_ui/undefined_validate_unsigned_part.rs:48:1
|
11 | pub struct Pallet<T>(_);
| -------------------- function or associated item `validate_unsigned` not found for this struct
...
49 | construct_runtime! {
48 | construct_runtime! {
| __^
| | _|
| ||
50 | || pub struct Runtime where
51 | || Block = Block,
52 | || NodeBlock = Block,
... ||
57 | || }
58 | || }
49 | || pub struct Runtime
50 | || {
51 | || System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
52 | || Pallet: pallet::{Pallet, ValidateUnsigned},
53 | || }
54 | || }
| ||_- in this macro invocation
... |
|
@@ -1,10 +1,7 @@
use frame_support::construct_runtime;
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: system::{Pallet},
#[cfg(feature(test))]
@@ -1,6 +1,6 @@
error: feature(test)
^ expected one of `=`, `,`, `)` here
--> tests/construct_runtime_ui/unsupported_meta_structure.rs:10:3
|
10 | #[cfg(feature(test))]
| ^
--> tests/construct_runtime_ui/unsupported_meta_structure.rs:7:3
|
7 | #[cfg(feature(test))]
| ^
@@ -1,10 +1,7 @@
use frame_support::construct_runtime;
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: system::{Pallet},
#[attr]
@@ -1,5 +1,5 @@
error: Unsupported attribute, only #[cfg] is supported on pallet declarations in `construct_runtime`
--> tests/construct_runtime_ui/unsupported_pallet_attr.rs:10:3
|
10 | #[attr]
| ^
--> tests/construct_runtime_ui/unsupported_pallet_attr.rs:7:3
|
7 | #[attr]
| ^
@@ -25,12 +25,9 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Sign
impl pallet::Config for Runtime {}
construct_runtime! {
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
pub struct Runtime
{
System: system::{Pallet, Call, Storage, Config, Event<T>},
System: system::{Pallet, Call, Storage, Config<T>, Event<T>},
Pallet: pallet use_parts { Call },
}
}
@@ -1,7 +1,7 @@
error: Invalid pallet part specified, the pallet `Pallet` doesn't have the `Call` part. Available parts are: `Pallet`, `Storage`.
--> tests/construct_runtime_ui/use_undefined_part.rs:34:30
--> tests/construct_runtime_ui/use_undefined_part.rs:31:30
|
34 | Pallet: pallet use_parts { Call },
31 | Pallet: pallet use_parts { Call },
| ^^^^
error[E0412]: cannot find type `RuntimeCall` in this scope