Rename pallet trait Trait to Config (#7599)

* rename Trait to Config

* add test asserting using Trait is still valid.

* fix ui tests
This commit is contained in:
Guillaume Thiolliere
2020-11-30 15:34:54 +01:00
committed by GitHub
parent dd3c84c362
commit 1cbfc9257f
200 changed files with 1767 additions and 1607 deletions
+5 -5
View File
@@ -24,12 +24,12 @@ use sp_runtime::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header
mod module {
use super::*;
pub trait Trait: system::Trait {
type Event: From<Event> + Into<<Self as system::Trait>::Event>;
pub trait Config: system::Config {
type Event: From<Event> + Into<<Self as system::Config>::Event>;
}
decl_module! {
pub struct Module<T: Trait> for enum Call where origin: T::Origin {
pub struct Module<T: Config> for enum Call where origin: T::Origin {
pub fn deposit_event() = default;
}
}
@@ -60,7 +60,7 @@ frame_support::parameter_types! {
}
#[derive(Clone, Eq, PartialEq)]
pub struct Runtime;
impl system::Trait for Runtime {
impl system::Config for Runtime {
type BaseCallFilter = ();
type Origin = Origin;
type Index = u64;
@@ -88,7 +88,7 @@ impl system::Trait for Runtime {
type SystemWeightInfo = ();
}
impl module::Trait for Runtime {
impl module::Config for Runtime {
type Event = Event;
}