mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 20:07:56 +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:
@@ -25,8 +25,9 @@ use frame_support::{
|
||||
dispatch::WithPostDispatchInfo,
|
||||
pallet_prelude::*,
|
||||
traits::{
|
||||
Currency, CurrencyToVote, Defensive, DefensiveResult, EstimateNextNewSession, Get,
|
||||
Imbalance, LockableCurrency, OnUnbalanced, TryCollect, UnixTime, WithdrawReasons,
|
||||
fungibles::Lockable, Currency, CurrencyToVote, Defensive, DefensiveResult,
|
||||
EstimateNextNewSession, Get, Imbalance, OnUnbalanced, TryCollect, UnixTime,
|
||||
WithdrawReasons,
|
||||
},
|
||||
weights::Weight,
|
||||
};
|
||||
|
||||
@@ -24,8 +24,8 @@ use frame_support::{
|
||||
dispatch::Codec,
|
||||
pallet_prelude::*,
|
||||
traits::{
|
||||
Currency, CurrencyToVote, Defensive, DefensiveResult, DefensiveSaturating, EnsureOrigin,
|
||||
EstimateNextNewSession, Get, LockIdentifier, LockableCurrency, OnUnbalanced, TryCollect,
|
||||
fungibles, fungibles::Lockable, Currency, CurrencyToVote, Defensive, DefensiveResult,
|
||||
DefensiveSaturating, EnsureOrigin, EstimateNextNewSession, Get, OnUnbalanced, TryCollect,
|
||||
UnixTime,
|
||||
},
|
||||
weights::Weight,
|
||||
@@ -50,7 +50,7 @@ use crate::{
|
||||
ValidatorPrefs,
|
||||
};
|
||||
|
||||
const STAKING_ID: LockIdentifier = *b"staking ";
|
||||
const STAKING_ID: fungibles::LockIdentifier = *b"staking ";
|
||||
|
||||
#[frame_support::pallet]
|
||||
pub mod pallet {
|
||||
@@ -78,7 +78,7 @@ pub mod pallet {
|
||||
#[pallet::config]
|
||||
pub trait Config: frame_system::Config {
|
||||
/// The staking balance.
|
||||
type Currency: LockableCurrency<
|
||||
type Currency: fungibles::Lockable<
|
||||
Self::AccountId,
|
||||
Moment = Self::BlockNumber,
|
||||
Balance = Self::CurrencyBalance,
|
||||
|
||||
Reference in New Issue
Block a user