Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
c68b3949
Commit
c68b3949
authored
Jul 25, 2019
by
Stefanie Doll
Committed by
Bastian Köcher
Jul 25, 2019
Browse files
Port dev account balance changes from Substrate PR 2883 to Polkadot (#339)
parent
87ab9f9b
Pipeline
#44602
passed with stages
in 16 minutes and 36 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
runtime/src/lib.rs
View file @
c68b3949
...
...
@@ -83,15 +83,14 @@ pub fn native_version() -> NativeVersion {
}
}
const
DOTS
:
Balance
=
1_000_000_000_000
;
const
BUCKS
:
Balance
=
DOTS
/
100
;
const
CENTS
:
Balance
=
BUCKS
/
100
;
const
MILLICENTS
:
Balance
=
CENTS
/
1_000
;
pub
const
MILLICENTS
:
Balance
=
1_000_000_000
;
pub
const
CENTS
:
Balance
=
1_000
*
MILLICENTS
;
// assume this is worth about a cent.
pub
const
DOLLARS
:
Balance
=
100
*
CENTS
;
const
SECS_PER_BLOCK
:
BlockNumber
=
6
;
const
MINUTES
:
BlockNumber
=
60
/
SECS_PER_BLOCK
;
const
HOURS
:
BlockNumber
=
MINUTES
*
60
;
const
DAYS
:
BlockNumber
=
HOURS
*
24
;
pub
const
SECS_PER_BLOCK
:
BlockNumber
=
6
;
pub
const
MINUTES
:
BlockNumber
=
60
/
SECS_PER_BLOCK
;
pub
const
HOURS
:
BlockNumber
=
MINUTES
*
60
;
pub
const
DAYS
:
BlockNumber
=
HOURS
*
24
;
parameter_types!
{
pub
const
BlockHashCount
:
u64
=
250
;
...
...
@@ -123,7 +122,7 @@ impl indices::Trait for Runtime {
}
parameter_types!
{
pub
const
ExistentialDeposit
:
Balance
=
1
*
BUCK
S
;
pub
const
ExistentialDeposit
:
Balance
=
1
*
DOLLAR
S
;
pub
const
TransferFee
:
Balance
=
1
*
CENTS
;
pub
const
CreationFee
:
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
VotingPeriod
:
BlockNumber
=
28
*
24
*
60
*
MINUTES
;
pub
const
EmergencyVotingPeriod
:
BlockNumber
=
3
*
24
*
60
*
MINUTES
;
pub
const
MinimumDeposit
:
Balance
=
100
*
BUCK
S
;
pub
const
MinimumDeposit
:
Balance
=
100
*
DOLLAR
S
;
pub
const
EnactmentPeriod
:
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!
{
pub
const
CandidacyBond
:
Balance
=
10
*
BUCK
S
;
pub
const
VotingBond
:
Balance
=
1
*
BUCK
S
;
pub
const
VotingFee
:
Balance
=
2
*
BUCK
S
;
pub
const
CandidacyBond
:
Balance
=
10
*
DOLLAR
S
;
pub
const
VotingBond
:
Balance
=
1
*
DOLLAR
S
;
pub
const
VotingFee
:
Balance
=
2
*
DOLLAR
S
;
pub
const
PresentSlashPerVoter
:
Balance
=
1
*
CENTS
;
pub
const
CarryCount
:
u32
=
6
;
// 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!
{
pub
const
ProposalBond
:
Permill
=
Permill
::
from_percent
(
5
);
pub
const
ProposalBondMinimum
:
Balance
=
1
*
BUCK
S
;
pub
const
ProposalBondMinimum
:
Balance
=
1
*
DOLLAR
S
;
pub
const
SpendPeriod
:
BlockNumber
=
1
*
DAYS
;
pub
const
Burn
:
Permill
=
Permill
::
from_percent
(
50
);
}
...
...
service/src/chain_spec.rs
View file @
c68b3949
...
...
@@ -21,7 +21,7 @@ use polkadot_primitives::{AccountId, SessionKey};
use
polkadot_runtime
::{
GenesisConfig
,
CouncilConfig
,
ElectionsConfig
,
DemocracyConfig
,
SystemConfig
,
AuraConfig
,
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
hex_literal
::
hex
;
...
...
@@ -62,15 +62,6 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
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
STASH
:
u128
=
100
*
DOLLARS
;
...
...
@@ -200,8 +191,9 @@ pub fn testnet_genesis(
]
});
const
STASH
:
u128
=
1
<<
20
;
const
ENDOWMENT
:
u128
=
1
<<
20
;
const
ENDOWMENT
:
u128
=
10_000_000
*
DOLLARS
;
const
STASH
:
u128
=
100
*
DOLLARS
;
let
desired_seats
=
(
endowed_accounts
.len
()
/
2
-
initial_authorities
.len
())
as
u32
;
GenesisConfig
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment