mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-06 02:08:02 +00:00
Add FixedPointOperand blanket implementation (#14634)
* bound `Balance` to `FixedPointOperand` * ".git/.scripts/commands/fmt/fmt.sh" * clean up code * Apply suggestions from code review Co-authored-by: Gavin Wood <gavin@parity.io> * wip * add blanket `FixedPointOperand` impl * update nis CurrencyBalance * remove CheckedNeg bound --------- Co-authored-by: command-bot <> Co-authored-by: Gavin Wood <gavin@parity.io>
This commit is contained in:
@@ -25,9 +25,7 @@ use crate::{
|
||||
dispatch::{DispatchError, DispatchResult},
|
||||
traits::Get,
|
||||
};
|
||||
use codec::MaxEncodedLen;
|
||||
use sp_runtime::{traits::MaybeSerializeDeserialize, FixedPointOperand};
|
||||
use sp_std::fmt::Debug;
|
||||
use sp_runtime::traits::MaybeSerializeDeserialize;
|
||||
|
||||
mod reservable;
|
||||
pub use reservable::{NamedReservableCurrency, ReservableCurrency};
|
||||
@@ -37,7 +35,7 @@ pub use lockable::{LockIdentifier, LockableCurrency, VestingSchedule};
|
||||
/// Abstraction over a fungible assets system.
|
||||
pub trait Currency<AccountId> {
|
||||
/// The balance of an account.
|
||||
type Balance: Balance + MaybeSerializeDeserialize + Debug + MaxEncodedLen + FixedPointOperand;
|
||||
type Balance: Balance + MaybeSerializeDeserialize;
|
||||
|
||||
/// The opaque token type for an imbalance. This is returned by unbalanced operations
|
||||
/// and must be dealt with. It may be dropped but cannot be cloned.
|
||||
|
||||
Reference in New Issue
Block a user