mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-21 01:41:03 +00:00
Introduce ReservableCurrency Trait in Balances Module (#2124)
* Introduce `ReservableCurrency` * Update Docs for `ReservableCurrency` * Update Tests * Bump spec and rebuild wasm * Extra: Add a note to `slash()` Discussion in Riot clarified the behavior of `slash()` and `can_slash()`. Trying to sneak clarifying comments about it into this PR * Update lib.rs * Don't drop the periods! CC @shawntabrizi
This commit is contained in:
@@ -24,7 +24,7 @@ use primitives::traits::{Zero, As, Bounded};
|
||||
use parity_codec::{Encode, Decode};
|
||||
use srml_support::{StorageValue, StorageMap, Parameter, Dispatchable, IsSubType, EnumerableStorageMap};
|
||||
use srml_support::{decl_module, decl_storage, decl_event, ensure};
|
||||
use srml_support::traits::{Currency, LockableCurrency, WithdrawReason, LockIdentifier};
|
||||
use srml_support::traits::{Currency, ReservableCurrency, LockableCurrency, WithdrawReason, LockIdentifier};
|
||||
use srml_support::dispatch::Result;
|
||||
use system::ensure_signed;
|
||||
|
||||
@@ -72,7 +72,7 @@ impl Vote {
|
||||
type BalanceOf<T> = <<T as Trait>::Currency as Currency<<T as system::Trait>::AccountId>>::Balance;
|
||||
|
||||
pub trait Trait: system::Trait + Sized {
|
||||
type Currency: LockableCurrency<<Self as system::Trait>::AccountId, Moment=Self::BlockNumber>;
|
||||
type Currency: ReservableCurrency<Self::AccountId> + LockableCurrency<Self::AccountId, Moment=Self::BlockNumber>;
|
||||
|
||||
type Proposal: Parameter + Dispatchable<Origin=Self::Origin> + IsSubType<Module<Self>>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user