Skip to content

Commit 2e70272

Browse files
authored
Renames of Trait to Config in README.md, weight templates and few minor ones (#7636)
* manual rename * renamse in README.md * fix template
1 parent 2bbffe6 commit 2e70272

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The Staking module is used to manage funds at stake by network maintainers.
44

5-
- [`staking::Trait`](https://docs.rs/pallet-staking/latest/pallet_staking/trait.Trait.html)
5+
- [`staking::Config`](https://docs.rs/pallet-staking/latest/pallet_staking/trait.Config.html)
66
- [`Call`](https://docs.rs/pallet-staking/latest/pallet_staking/enum.Call.html)
77
- [`Module`](https://docs.rs/pallet-staking/latest/pallet_staking/struct.Module.html)
88

@@ -90,7 +90,7 @@ valid behavior_ while _punishing any misbehavior or lack of availability_.
9090

9191
Rewards must be claimed for each era before it gets too old by `$HISTORY_DEPTH` using the
9292
`payout_stakers` call. Any account can call `payout_stakers`, which pays the reward to the
93-
validator as well as its nominators. Only the [`Trait::MaxNominatorRewardedPerValidator`]
93+
validator as well as its nominators. Only the [`Config::MaxNominatorRewardedPerValidator`]
9494
biggest stakers can claim their reward. This is to limit the i/o cost to mutate storage for each
9595
nominator's account.
9696

@@ -137,10 +137,10 @@ use frame_support::{decl_module, dispatch};
137137
use frame_system::ensure_signed;
138138
use pallet_staking::{self as staking};
139139

140-
pub trait Trait: staking::Trait {}
140+
pub trait Config: staking::Config {}
141141

142142
decl_module! {
143-
pub struct Module<T: Trait> for enum Call where origin: T::Origin {
143+
pub struct Module<T: Config> for enum Call where origin: T::Origin {
144144
/// Reward a validator.
145145
#[weight = 0]
146146
pub fn reward_myself(origin) -> dispatch::DispatchResult {
@@ -157,7 +157,7 @@ decl_module! {
157157
### Era payout
158158

159159
The era payout is computed using yearly inflation curve defined at
160-
[`T::RewardCurve`](https://docs.rs/pallet-staking/latest/pallet_staking/trait.Trait.html#associatedtype.RewardCurve) as such:
160+
[`T::RewardCurve`](https://docs.rs/pallet-staking/latest/pallet_staking/trait.Config.html#associatedtype.RewardCurve) as such:
161161

162162
```nocompile
163163
staker_payout = yearly_inflation(npos_token_staked / total_tokens) * total_tokens / era_per_year
@@ -168,7 +168,7 @@ This payout is used to reward stakers as defined in next section
168168
remaining_payout = max_yearly_inflation * total_tokens / era_per_year - staker_payout
169169
```
170170
The remaining reward is send to the configurable end-point
171-
[`T::RewardRemainder`](https://docs.rs/pallet-staking/latest/pallet_staking/trait.Trait.html#associatedtype.RewardRemainder).
171+
[`T::RewardRemainder`](https://docs.rs/pallet-staking/latest/pallet_staking/trait.Config.html#associatedtype.RewardRemainder).
172172

173173
### Reward Calculation
174174

@@ -214,7 +214,7 @@ Any funds already placed into stash can be the target of the following operation
214214

215215
The controller account can free a portion (or all) of the funds using the
216216
[`unbond`](https://docs.rs/pallet-staking/latest/pallet_staking/enum.Call.html#variant.unbond) call. Note that the funds are not immediately
217-
accessible. Instead, a duration denoted by [`BondingDuration`](https://docs.rs/pallet-staking/latest/pallet_staking/trait.Trait.html#associatedtype.BondingDuration)
217+
accessible. Instead, a duration denoted by [`BondingDuration`](https://docs.rs/pallet-staking/latest/pallet_staking/trait.Config.html#associatedtype.BondingDuration)
218218
(in number of eras) must pass until the funds can actually be removed. Once the
219219
`BondingDuration` is over, the [`withdraw_unbonded`](https://docs.rs/pallet-staking/latest/pallet_staking/enum.Call.html#variant.withdraw_unbonded)
220220
call can be used to actually withdraw the funds.

0 commit comments

Comments
 (0)