mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 00:31:07 +00:00
Move LockableCurrency trait to fungibles::Lockable and deprecate LockableCurrency (#12798)
* WIP move LockableCurrency to fungibles * rename Lockable and LockIdentifier to funginbles::* * fix imports further * change Lockable from fungible to fungibles * reintroduce LockableCurrency but marked as deprecated * fix imports * fix imports * cargo fmt * add allow deprecated warnings * remove unused benchmark import * fix some of the docs * fix failing doctest check * reexport LockIdentifier and LockableCurrency from support/traits * reexport LockIdentifier and LockableCurrency from support/traits * allow using deprecated re-export * replace LockableCurrency and LockIdentifier with a module alias * Update frame/support/src/traits/tokens/fungibles/lockable.rs * Update frame/staking/src/pallet/mod.rs Co-authored-by: Squirrel <gilescope@gmail.com> * Update frame/support/src/traits.rs Co-authored-by: Squirrel <gilescope@gmail.com> * REVERT removing fungibles::Lockable import Co-authored-by: parity-processbot <> Co-authored-by: Squirrel <gilescope@gmail.com>
This commit is contained in:
@@ -57,7 +57,7 @@ that you need, then you can avoid coupling with the Balances module.
|
||||
fungible assets system.
|
||||
- [`ReservableCurrency`](https://docs.rs/frame-support/latest/frame_support/traits/trait.ReservableCurrency.html):
|
||||
Functions for dealing with assets that can be reserved from an account.
|
||||
- [`LockableCurrency`](https://docs.rs/frame-support/latest/frame_support/traits/trait.LockableCurrency.html): Functions for
|
||||
- [`Lockable`](https://docs.rs/frame-support/latest/frame_support/traits/fungibles/trait.Lockable.html): Functions for
|
||||
dealing with accounts that allow liquidity restrictions.
|
||||
- [`Imbalance`](https://docs.rs/frame-support/latest/frame_support/traits/trait.Imbalance.html): Functions for handling
|
||||
imbalances between total issuance in the system and account balances. Must be used when a function
|
||||
@@ -88,13 +88,13 @@ pub type NegativeImbalanceOf<T> = <<T as Config>::Currency as Currency<<T as fra
|
||||
|
||||
```
|
||||
|
||||
The Staking module uses the `LockableCurrency` trait to lock a stash account's funds:
|
||||
The Staking module uses the `fungibles::Lockable` trait to lock a stash account's funds:
|
||||
|
||||
```rust
|
||||
use frame_support::traits::{WithdrawReasons, LockableCurrency};
|
||||
use frame_support::traits::{WithdrawReasons, fungibles};
|
||||
use sp_runtime::traits::Bounded;
|
||||
pub trait Config: frame_system::Config {
|
||||
type Currency: LockableCurrency<Self::AccountId, Moment=Self::BlockNumber>;
|
||||
type Currency: fungibles::Lockable<Self::AccountId, Moment=Self::BlockNumber>;
|
||||
}
|
||||
|
||||
fn update_ledger<T: Config>(
|
||||
|
||||
Reference in New Issue
Block a user