22
33The Balances module provides functionality for handling accounts and balances.
44
5- - [ ` balances::Trait ` ] ( https://docs.rs/pallet-balances/latest/pallet_balances/trait.Trait .html )
5+ - [ ` balances::Config ` ] ( https://docs.rs/pallet-balances/latest/pallet_balances/trait.Config .html )
66- [ ` Call ` ] ( https://docs.rs/pallet-balances/latest/pallet_balances/enum.Call.html )
77- [ ` Module ` ] ( https://docs.rs/pallet-balances/latest/pallet_balances/struct.Module.html )
88
@@ -83,8 +83,8 @@ The Contract module uses the `Currency` trait to handle gas payment, and its typ
8383``` rust
8484use frame_support :: traits :: Currency ;
8585
86- pub type BalanceOf <T > = << T as Trait >:: Currency as Currency <<T as frame_system :: Trait >:: AccountId >> :: Balance ;
87- pub type NegativeImbalanceOf <T > = << T as Trait >:: Currency as Currency <<T as frame_system :: Trait >:: AccountId >> :: NegativeImbalance ;
86+ pub type BalanceOf <T > = << T as Config >:: Currency as Currency <<T as frame_system :: Config >:: AccountId >> :: Balance ;
87+ pub type NegativeImbalanceOf <T > = << T as Config >:: Currency as Currency <<T as frame_system :: Config >:: AccountId >> :: NegativeImbalance ;
8888
8989```
9090
@@ -93,11 +93,11 @@ The Staking module uses the `LockableCurrency` trait to lock a stash account's f
9393``` rust
9494use frame_support :: traits :: {WithdrawReasons , LockableCurrency };
9595use sp_runtime :: traits :: Bounded ;
96- pub trait Trait : frame_system :: Trait {
96+ pub trait Config : frame_system :: Config {
9797 type Currency : LockableCurrency <Self :: AccountId , Moment = Self :: BlockNumber >;
9898}
9999
100- fn update_ledger <T : Trait >(
100+ fn update_ledger <T : Config >(
101101 controller : & T :: AccountId ,
102102 ledger : & StakingLedger <T >
103103) {
@@ -117,6 +117,6 @@ The Balances module depends on the [`GenesisConfig`](https://docs.rs/pallet-bala
117117
118118## Assumptions
119119
120- * Total issued balanced of all accounts should be less than ` Trait ::Balance::max_value()` .
120+ * Total issued balanced of all accounts should be less than ` Config ::Balance::max_value()` .
121121
122122License: Apache-2.0
0 commit comments