mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 23:21:06 +00:00
Make automatic storage deposits resistant against changing deposit prices (#12083)
* Require `FixedPointOperand` for Balances * Delay deposit calculation * Make refunds pro rata of consumed storage * Add storage migration * Fix clippy * Add liquidity checks * Fixe delayed deposit limit enforcement * Defer charges * Import Vec * Add try-runtime hooks for migration * Fix warning * Adapt to new OnRuntimeUpgrade trait * Apply suggestions from code review Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> * fmt * Apply suggestions from code review Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> * More suggestions from code review Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>
This commit is contained in:
committed by
GitHub
parent
cb82064cb8
commit
857c3bf37b
@@ -185,7 +185,7 @@ use sp_runtime::{
|
||||
AtLeast32BitUnsigned, Bounded, CheckedAdd, CheckedSub, MaybeSerializeDeserialize,
|
||||
Saturating, StaticLookup, Zero,
|
||||
},
|
||||
ArithmeticError, DispatchError, RuntimeDebug,
|
||||
ArithmeticError, DispatchError, FixedPointOperand, RuntimeDebug,
|
||||
};
|
||||
use sp_std::{cmp, fmt::Debug, mem, ops::BitOr, prelude::*, result};
|
||||
pub use weights::WeightInfo;
|
||||
@@ -212,7 +212,8 @@ pub mod pallet {
|
||||
+ MaybeSerializeDeserialize
|
||||
+ Debug
|
||||
+ MaxEncodedLen
|
||||
+ TypeInfo;
|
||||
+ TypeInfo
|
||||
+ FixedPointOperand;
|
||||
|
||||
/// Handler for the unbalanced reduction when removing a dust account.
|
||||
type DustRemoval: OnUnbalanced<NegativeImbalance<Self, I>>;
|
||||
|
||||
Reference in New Issue
Block a user