@@ -37,10 +37,10 @@ use frame_support::traits::{Currency, ReservableCurrency, Get, BalanceStatus::Re
37
37
use frame_system:: { ensure_signed, ensure_root} ;
38
38
pub use weights:: WeightInfo ;
39
39
40
- type BalanceOf < T > = <<T as Trait >:: Currency as Currency < <T as frame_system:: Trait >:: AccountId > >:: Balance ;
40
+ type BalanceOf < T > = <<T as Config >:: Currency as Currency < <T as frame_system:: Config >:: AccountId > >:: Balance ;
41
41
42
42
/// The module's config trait.
43
- pub trait Trait : frame_system:: Trait {
43
+ pub trait Config : frame_system:: Config {
44
44
/// Type used for storing an account's index; implies the maximum number of accounts the system
45
45
/// can hold.
46
46
type AccountIndex : Parameter + Member + Codec + Default + AtLeast32Bit + Copy ;
@@ -52,14 +52,14 @@ pub trait Trait: frame_system::Trait {
52
52
type Deposit : Get < BalanceOf < Self > > ;
53
53
54
54
/// The overarching event type.
55
- type Event : From < Event < Self > > + Into < <Self as frame_system:: Trait >:: Event > ;
55
+ type Event : From < Event < Self > > + Into < <Self as frame_system:: Config >:: Event > ;
56
56
57
57
/// Weight information for extrinsics in this pallet.
58
58
type WeightInfo : WeightInfo ;
59
59
}
60
60
61
61
decl_storage ! {
62
- trait Store for Module <T : Trait > as Indices {
62
+ trait Store for Module <T : Config > as Indices {
63
63
/// The lookup from index to account.
64
64
pub Accounts build( |config: & GenesisConfig <T >|
65
65
config. indices. iter( )
@@ -75,8 +75,8 @@ decl_storage! {
75
75
76
76
decl_event ! (
77
77
pub enum Event <T > where
78
- <T as frame_system:: Trait >:: AccountId ,
79
- <T as Trait >:: AccountIndex
78
+ <T as frame_system:: Config >:: AccountId ,
79
+ <T as Config >:: AccountIndex
80
80
{
81
81
/// A account index was assigned. \[index, who\]
82
82
IndexAssigned ( AccountId , AccountIndex ) ,
@@ -88,7 +88,7 @@ decl_event!(
88
88
) ;
89
89
90
90
decl_error ! {
91
- pub enum Error for Module <T : Trait > {
91
+ pub enum Error for Module <T : Config > {
92
92
/// The index was not already assigned.
93
93
NotAssigned ,
94
94
/// The index is assigned to another account.
@@ -103,7 +103,7 @@ decl_error! {
103
103
}
104
104
105
105
decl_module ! {
106
- pub struct Module <T : Trait > for enum Call where origin: T :: Origin , system = frame_system {
106
+ pub struct Module <T : Config > for enum Call where origin: T :: Origin , system = frame_system {
107
107
/// The deposit needed for reserving an index.
108
108
const Deposit : BalanceOf <T > = T :: Deposit :: get( ) ;
109
109
@@ -275,7 +275,7 @@ decl_module! {
275
275
}
276
276
}
277
277
278
- impl < T : Trait > Module < T > {
278
+ impl < T : Config > Module < T > {
279
279
// PUBLIC IMMUTABLES
280
280
281
281
/// Lookup an T::AccountIndex to get an Id, if there's one there.
@@ -295,7 +295,7 @@ impl<T: Trait> Module<T> {
295
295
}
296
296
}
297
297
298
- impl < T : Trait > StaticLookup for Module < T > {
298
+ impl < T : Config > StaticLookup for Module < T > {
299
299
type Source = MultiAddress < T :: AccountId , T :: AccountIndex > ;
300
300
type Target = T :: AccountId ;
301
301
0 commit comments