mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +00:00
Port dev account balance changes from Substrate PR 2883 to Polkadot (#339)
This commit is contained in:
committed by
Bastian Köcher
parent
2af72cef83
commit
86e5b3d0bb
+13
-14
@@ -83,15 +83,14 @@ pub fn native_version() -> NativeVersion {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const DOTS: Balance = 1_000_000_000_000;
|
pub const MILLICENTS: Balance = 1_000_000_000;
|
||||||
const BUCKS: Balance = DOTS / 100;
|
pub const CENTS: Balance = 1_000 * MILLICENTS; // assume this is worth about a cent.
|
||||||
const CENTS: Balance = BUCKS / 100;
|
pub const DOLLARS: Balance = 100 * CENTS;
|
||||||
const MILLICENTS: Balance = CENTS / 1_000;
|
|
||||||
|
|
||||||
const SECS_PER_BLOCK: BlockNumber = 6;
|
pub const SECS_PER_BLOCK: BlockNumber = 6;
|
||||||
const MINUTES: BlockNumber = 60 / SECS_PER_BLOCK;
|
pub const MINUTES: BlockNumber = 60 / SECS_PER_BLOCK;
|
||||||
const HOURS: BlockNumber = MINUTES * 60;
|
pub const HOURS: BlockNumber = MINUTES * 60;
|
||||||
const DAYS: BlockNumber = HOURS * 24;
|
pub const DAYS: BlockNumber = HOURS * 24;
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const BlockHashCount: u64 = 250;
|
pub const BlockHashCount: u64 = 250;
|
||||||
@@ -123,7 +122,7 @@ impl indices::Trait for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const ExistentialDeposit: Balance = 1 * BUCKS;
|
pub const ExistentialDeposit: Balance = 1 * DOLLARS;
|
||||||
pub const TransferFee: Balance = 1 * CENTS;
|
pub const TransferFee: Balance = 1 * CENTS;
|
||||||
pub const CreationFee: Balance = 1 * CENTS;
|
pub const CreationFee: Balance = 1 * CENTS;
|
||||||
pub const TransactionBaseFee: Balance = 1 * CENTS;
|
pub const TransactionBaseFee: Balance = 1 * CENTS;
|
||||||
@@ -257,7 +256,7 @@ parameter_types! {
|
|||||||
pub const LaunchPeriod: BlockNumber = 28 * 24 * 60 * MINUTES;
|
pub const LaunchPeriod: BlockNumber = 28 * 24 * 60 * MINUTES;
|
||||||
pub const VotingPeriod: BlockNumber = 28 * 24 * 60 * MINUTES;
|
pub const VotingPeriod: BlockNumber = 28 * 24 * 60 * MINUTES;
|
||||||
pub const EmergencyVotingPeriod: BlockNumber = 3 * 24 * 60 * MINUTES;
|
pub const EmergencyVotingPeriod: BlockNumber = 3 * 24 * 60 * MINUTES;
|
||||||
pub const MinimumDeposit: Balance = 100 * BUCKS;
|
pub const MinimumDeposit: Balance = 100 * DOLLARS;
|
||||||
pub const EnactmentPeriod: BlockNumber = 30 * 24 * 60 * MINUTES;
|
pub const EnactmentPeriod: BlockNumber = 30 * 24 * 60 * MINUTES;
|
||||||
pub const CooloffPeriod: BlockNumber = 30 * 24 * 60 * MINUTES;
|
pub const CooloffPeriod: BlockNumber = 30 * 24 * 60 * MINUTES;
|
||||||
}
|
}
|
||||||
@@ -288,9 +287,9 @@ impl collective::Trait<CouncilInstance> for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const CandidacyBond: Balance = 10 * BUCKS;
|
pub const CandidacyBond: Balance = 10 * DOLLARS;
|
||||||
pub const VotingBond: Balance = 1 * BUCKS;
|
pub const VotingBond: Balance = 1 * DOLLARS;
|
||||||
pub const VotingFee: Balance = 2 * BUCKS;
|
pub const VotingFee: Balance = 2 * DOLLARS;
|
||||||
pub const PresentSlashPerVoter: Balance = 1 * CENTS;
|
pub const PresentSlashPerVoter: Balance = 1 * CENTS;
|
||||||
pub const CarryCount: u32 = 6;
|
pub const CarryCount: u32 = 6;
|
||||||
// one additional vote should go by before an inactive voter can be reaped.
|
// one additional vote should go by before an inactive voter can be reaped.
|
||||||
@@ -326,7 +325,7 @@ impl collective::Trait<TechnicalInstance> for Runtime {
|
|||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const ProposalBond: Permill = Permill::from_percent(5);
|
pub const ProposalBond: Permill = Permill::from_percent(5);
|
||||||
pub const ProposalBondMinimum: Balance = 1 * BUCKS;
|
pub const ProposalBondMinimum: Balance = 1 * DOLLARS;
|
||||||
pub const SpendPeriod: BlockNumber = 1 * DAYS;
|
pub const SpendPeriod: BlockNumber = 1 * DAYS;
|
||||||
pub const Burn: Permill = Permill::from_percent(50);
|
pub const Burn: Permill = Permill::from_percent(50);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ use polkadot_primitives::{AccountId, SessionKey};
|
|||||||
use polkadot_runtime::{
|
use polkadot_runtime::{
|
||||||
GenesisConfig, CouncilConfig, ElectionsConfig, DemocracyConfig, SystemConfig, AuraConfig,
|
GenesisConfig, CouncilConfig, ElectionsConfig, DemocracyConfig, SystemConfig, AuraConfig,
|
||||||
SessionConfig, StakingConfig, BalancesConfig, Perbill, SessionKeys, TechnicalCommitteeConfig,
|
SessionConfig, StakingConfig, BalancesConfig, Perbill, SessionKeys, TechnicalCommitteeConfig,
|
||||||
GrandpaConfig, SudoConfig, IndicesConfig, CuratedGrandpaConfig, StakerStatus, WASM_BINARY,
|
GrandpaConfig, SudoConfig, IndicesConfig, CuratedGrandpaConfig, StakerStatus, WASM_BINARY, DAYS, DOLLARS,
|
||||||
};
|
};
|
||||||
use telemetry::TelemetryEndpoints;
|
use telemetry::TelemetryEndpoints;
|
||||||
use hex_literal::hex;
|
use hex_literal::hex;
|
||||||
@@ -62,15 +62,6 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
|
|||||||
hex!["8abecfa66704176be23df099bf441ea65444992d63b3ced3e76a17a4d38b0b0e"].unchecked_into(), // 5FCd9Y7RLNyxz5wnCAErfsLbXGG34L2BaZRHzhiJcMUMd5zd
|
hex!["8abecfa66704176be23df099bf441ea65444992d63b3ced3e76a17a4d38b0b0e"].unchecked_into(), // 5FCd9Y7RLNyxz5wnCAErfsLbXGG34L2BaZRHzhiJcMUMd5zd
|
||||||
)];
|
)];
|
||||||
|
|
||||||
const MILLICENTS: u128 = 1_000_000_000;
|
|
||||||
const CENTS: u128 = 1_000 * MILLICENTS; // assume this is worth about a cent.
|
|
||||||
const DOLLARS: u128 = 100 * CENTS;
|
|
||||||
|
|
||||||
const SECS_PER_BLOCK: u64 = 6;
|
|
||||||
const MINUTES: u64 = 60 / SECS_PER_BLOCK;
|
|
||||||
const HOURS: u64 = MINUTES * 60;
|
|
||||||
const DAYS: u64 = HOURS * 24;
|
|
||||||
|
|
||||||
const ENDOWMENT: u128 = 10_000_000 * DOLLARS;
|
const ENDOWMENT: u128 = 10_000_000 * DOLLARS;
|
||||||
const STASH: u128 = 100 * DOLLARS;
|
const STASH: u128 = 100 * DOLLARS;
|
||||||
|
|
||||||
@@ -200,8 +191,9 @@ pub fn testnet_genesis(
|
|||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
const STASH: u128 = 1 << 20;
|
const ENDOWMENT: u128 = 10_000_000 * DOLLARS;
|
||||||
const ENDOWMENT: u128 = 1 << 20;
|
const STASH: u128 = 100 * DOLLARS;
|
||||||
|
|
||||||
let desired_seats = (endowed_accounts.len() / 2 - initial_authorities.len()) as u32;
|
let desired_seats = (endowed_accounts.len() / 2 - initial_authorities.len()) as u32;
|
||||||
|
|
||||||
GenesisConfig {
|
GenesisConfig {
|
||||||
|
|||||||
Reference in New Issue
Block a user