mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 00:31:07 +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:
@@ -165,6 +165,7 @@ pub mod pallet {
|
||||
fungible::{self, hold::Mutate as FunHoldMutate, Balanced as FunBalanced},
|
||||
nonfungible::{Inspect as NftInspect, Transfer as NftTransfer},
|
||||
tokens::{
|
||||
Balance,
|
||||
Fortitude::Polite,
|
||||
Precision::{BestEffort, Exact},
|
||||
Preservation::Expendable,
|
||||
@@ -214,17 +215,9 @@ pub mod pallet {
|
||||
/// Overarching hold reason.
|
||||
type RuntimeHoldReason: From<HoldReason>;
|
||||
|
||||
/// Just the `Currency::Balance` type; we have this item to allow us to constrain it to
|
||||
/// `From<u64>`.
|
||||
type CurrencyBalance: sp_runtime::traits::AtLeast32BitUnsigned
|
||||
+ codec::FullCodec
|
||||
+ Copy
|
||||
+ MaybeSerializeDeserialize
|
||||
+ sp_std::fmt::Debug
|
||||
+ Default
|
||||
+ From<u64>
|
||||
+ TypeInfo
|
||||
+ MaxEncodedLen;
|
||||
/// Just the [`Balance`] type; we have this item to allow us to constrain it to
|
||||
/// [`From<u64>`].
|
||||
type CurrencyBalance: Balance + From<u64>;
|
||||
|
||||
/// Origin required for auto-funding the deficit.
|
||||
type FundOrigin: EnsureOrigin<Self::RuntimeOrigin>;
|
||||
|
||||
Reference in New Issue
Block a user