add frame_system::DefaultConfig to individual pallet DefaultConfigs (#14453)

* add frame_system::DefaultConfig to individual pallet DefaultConfigs

* Fixes tests

* Minor fix

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

* Adds UI Tests

---------

Co-authored-by: Nikhil Gupta <17176722+gupnik@users.noreply.github.com>
Co-authored-by: command-bot <>
This commit is contained in:
Kian Paimani
2023-08-14 03:53:54 -07:00
committed by GitHub
parent 90270c91c3
commit 43cd1ae37a
12 changed files with 205 additions and 137 deletions
@@ -0,0 +1,15 @@
#[frame_support::pallet]
mod pallet {
use frame_support::pallet_prelude::*;
#[pallet::config(with_default)]
pub trait Config: frame_system::Config {
#[pallet::constant]
type MyGetParam2: Get<Self::RuntimeCall>;
}
#[pallet::pallet]
pub struct Pallet<T>(_);
}
fn main() {}
@@ -0,0 +1,5 @@
error[E0220]: associated type `RuntimeCall` not found for `Self`
--> tests/pallet_ui/default_config_with_no_default_in_system.rs:8:31
|
8 | type MyGetParam2: Get<Self::RuntimeCall>;
| ^^^^^^^^^^^ associated type `RuntimeCall` not found
@@ -0,0 +1,15 @@
#[frame_support::pallet]
mod pallet {
use frame_support::pallet_prelude::*;
#[pallet::config(with_default)]
pub trait Config: frame_system::Config {
#[pallet::constant]
type MyGetParam2: Get<Self::AccountId>;
}
#[pallet::pallet]
pub struct Pallet<T>(_);
}
fn main() {}