mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +00:00
Update Substrate, introduce Society/Recovery (#757)
* Bump Substrate * Bump RT version * Bump substrate, add new modules * Fix * Bump Substrate * Bump impl version * Address grumbles
This commit is contained in:
@@ -78,7 +78,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
impl_name: create_runtime_str!("parity-kusama"),
|
||||
authoring_version: 2,
|
||||
spec_version: 1040,
|
||||
impl_version: 0,
|
||||
impl_version: 1,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
};
|
||||
|
||||
@@ -174,7 +174,7 @@ pub type DealWithFees = SplitTwoWays<
|
||||
impl balances::Trait for Runtime {
|
||||
type Balance = Balance;
|
||||
type OnFreeBalanceZero = Staking;
|
||||
type OnReapAccount = System;
|
||||
type OnReapAccount = (System, Recovery);
|
||||
type OnNewAccount = Indices;
|
||||
type Event = Event;
|
||||
type DustRemoval = ();
|
||||
@@ -546,6 +546,50 @@ impl utility::Trait for Runtime {
|
||||
type MaxSignatories = MaxSignatories;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const ConfigDepositBase: Balance = 5 * DOLLARS;
|
||||
pub const FriendDepositFactor: Balance = 50 * CENTS;
|
||||
pub const MaxFriends: u16 = 9;
|
||||
pub const RecoveryDeposit: Balance = 5 * DOLLARS;
|
||||
}
|
||||
|
||||
impl recovery::Trait for Runtime {
|
||||
type Event = Event;
|
||||
type Call = Call;
|
||||
type Currency = Balances;
|
||||
type ConfigDepositBase = ConfigDepositBase;
|
||||
type FriendDepositFactor = FriendDepositFactor;
|
||||
type MaxFriends = MaxFriends;
|
||||
type RecoveryDeposit = RecoveryDeposit;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const CandidateDeposit: Balance = 10 * DOLLARS;
|
||||
pub const WrongSideDeduction: Balance = 2 * DOLLARS;
|
||||
pub const MaxStrikes: u32 = 10;
|
||||
pub const RotationPeriod: BlockNumber = 80 * HOURS;
|
||||
pub const PeriodSpend: Balance = 500 * DOLLARS;
|
||||
pub const MaxLockDuration: BlockNumber = 36 * 30 * DAYS;
|
||||
pub const ChallengePeriod: BlockNumber = 7 * DAYS;
|
||||
pub const MaxMembers: u32 = 999;
|
||||
}
|
||||
|
||||
impl society::Trait for Runtime {
|
||||
type Event = Event;
|
||||
type Currency = Balances;
|
||||
type Randomness = RandomnessCollectiveFlip;
|
||||
type CandidateDeposit = CandidateDeposit;
|
||||
type WrongSideDeduction = WrongSideDeduction;
|
||||
type MaxStrikes = MaxStrikes;
|
||||
type PeriodSpend = PeriodSpend;
|
||||
type MembershipChanged = ();
|
||||
type RotationPeriod = RotationPeriod;
|
||||
type MaxLockDuration = MaxLockDuration;
|
||||
type FounderSetOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
|
||||
type SuspensionJudgementOrigin = society::EnsureFounder<Runtime>;
|
||||
type ChallengePeriod = ChallengePeriod;
|
||||
}
|
||||
|
||||
construct_runtime! {
|
||||
pub enum Runtime where
|
||||
Block = Block,
|
||||
@@ -597,6 +641,12 @@ construct_runtime! {
|
||||
|
||||
// Less simple identity module.
|
||||
Identity: identity::{Module, Call, Storage, Event<T>},
|
||||
|
||||
// Society module.
|
||||
Society: society::{Module, Call, Storage, Event<T>},
|
||||
|
||||
// Social recovery module.
|
||||
Recovery: recovery::{Module, Call, Storage, Event<T>},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user