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
@@ -35,7 +35,7 @@ use proc_macro::TokenStream;
///
/// ```nocompile
/// decl_storage! {
/// trait Store for Module<T: Trait> as Example {
/// trait Store for Module<T: Config> as Example {
/// Foo get(fn foo) config(): u32=12;
/// Bar: map hasher(identity) u32 => u32;
/// pub Zed build(|config| vec![(0, 0)]): map hasher(identity) u32 => u32;
@@ -43,7 +43,7 @@ use proc_macro::TokenStream;
/// }
/// ```
///
/// Declaration is set with the header `(pub) trait Store for Module<T: Trait> as Example`,
/// Declaration is set with the header `(pub) trait Store for Module<T: Config> as Example`,
/// with `Store` a (pub) trait generated associating each storage item to the `Module` and
/// `as Example` setting the prefix used for storage items of this module. `Example` must be unique:
/// another module with the same name and the same inner storage item name will conflict.
@@ -169,7 +169,7 @@ use proc_macro::TokenStream;
///
/// ```nocompile
/// decl_storage! {
/// trait Store for Module<T: Trait> as Example {
/// trait Store for Module<T: Config> as Example {
///
/// // Your storage items
/// }
@@ -202,7 +202,7 @@ use proc_macro::TokenStream;
/// (`DefaultInstance` type is optional):
///
/// ```nocompile
/// trait Store for Module<T: Trait<I>, I: Instance=DefaultInstance> as Example {}
/// trait Store for Module<T: Config<I>, I: Instance=DefaultInstance> as Example {}
/// ```
///
/// Accessing the structure no requires the instance as generic parameter:
@@ -214,7 +214,7 @@ use proc_macro::TokenStream;
/// This macro supports a where clause which will be replicated to all generated types.
///
/// ```nocompile
/// trait Store for Module<T: Trait> as Example where T::AccountId: std::fmt::Display {}
/// trait Store for Module<T: Config> as Example where T::AccountId: std::fmt::Display {}
/// ```
///
/// ## Limitations