mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 19:21:13 +00:00
Per-things trait. (#4904)
* Give perthigns the trait it always deserved.
* Make staking and phragmen work with the new generic per_thing
* Make everything work together 🔨
* a bit of cleanup
* Clean usage
* Bump.
* Fix name
* fix grumbles
* hopefully fix the ui test
* Some grumbles
* revamp traits again
* Better naming again.
This commit is contained in:
@@ -50,7 +50,7 @@ use sp_std::prelude::*;
|
||||
use sp_std::fmt::Debug;
|
||||
use codec::{Encode, Decode};
|
||||
use sp_runtime::{DispatchResult, RuntimeDebug, traits::{
|
||||
StaticLookup, Zero, SimpleArithmetic, MaybeSerializeDeserialize, Saturating, Convert
|
||||
StaticLookup, Zero, AtLeast32Bit, MaybeSerializeDeserialize, Saturating, Convert
|
||||
}};
|
||||
use frame_support::{decl_module, decl_event, decl_storage, decl_error};
|
||||
use frame_support::traits::{
|
||||
@@ -85,8 +85,8 @@ pub struct VestingInfo<Balance, BlockNumber> {
|
||||
}
|
||||
|
||||
impl<
|
||||
Balance: SimpleArithmetic + Copy,
|
||||
BlockNumber: SimpleArithmetic + Copy,
|
||||
Balance: AtLeast32Bit + Copy,
|
||||
BlockNumber: AtLeast32Bit + Copy,
|
||||
> VestingInfo<Balance, BlockNumber> {
|
||||
/// Amount locked at block `n`.
|
||||
pub fn locked_at<
|
||||
@@ -298,7 +298,9 @@ mod tests {
|
||||
// The testing primitives are very useful for avoiding having to work with signatures
|
||||
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
|
||||
use sp_runtime::{
|
||||
Perbill, testing::Header, traits::{BlakeTwo256, IdentityLookup, Identity, OnInitialize},
|
||||
Perbill,
|
||||
testing::Header,
|
||||
traits::{BlakeTwo256, IdentityLookup, Identity, OnInitialize},
|
||||
};
|
||||
use sp_storage::Storage;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user