Skip to content

Commit

Permalink
basic staking mod
Browse files Browse the repository at this point in the history
  • Loading branch information
sekisamu committed Jun 13, 2019
1 parent e1212fc commit 2bcf07c
Show file tree
Hide file tree
Showing 12 changed files with 845 additions and 32 deletions.
52 changes: 52 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ members = [
"srml/contract",
"srml/try",
"srml/staking",
"srml/treasury",
"srml/session",
]
exclude = ["runtime/wasm"]

Expand Down
1 change: 1 addition & 0 deletions src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ fn testnet_genesis(initial_authorities: Vec<(AccountId, AccountId, AuthorityId)>
offline_slash_grace: 0,
stakers: initial_authorities.iter().map(|x| (x.0.clone(), x.1.clone(), STASH, StakerStatus::Validator)).collect(),
invulnerables: initial_authorities.iter().map(|x| x.1.clone()).collect(),
era_per_epoch: 5000,
}),
ring: Some(RingConfig {
transaction_base_fee: 1,
Expand Down
48 changes: 48 additions & 0 deletions srml/session/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[package]
name = "evo-session"
version = "0.1.0"
authors = ["hammeWang <[email protected]>"]
edition = "2018"

[dependencies]
hex-literal = "0.1.0"
serde = { version = "1.0", default-features = false }
serde_derive = { version = "1.0", optional = true }
safe-mix = { version = "1.0", default-features = false}
parity-codec = { version = "3.0", default-features = false }
parity-codec-derive = { version = "3.0", default-features = false }
substrate-keyring = { git = "https://github.com/paritytech/substrate", optional = true }
substrate-primitives = { git = "https://github.com/paritytech/substrate", default-features = false }
rstd = { package ="sr-std", git = "https://github.com/paritytech/substrate", default-features = false }
primitives = { package ="sr-primitives", git = "https://github.com/paritytech/substrate", default-features = false }
srml-support = { git = "https://github.com/paritytech/substrate", default-features = false }
system = { package ="srml-system", git = "https://github.com/paritytech/substrate", default-features = false }
balances = { package ="srml-balances", git = "https://github.com/paritytech/substrate", default_features = false }
timestamp = { package ="srml-timestamp", git = "https://github.com/paritytech/substrate", default_features = false }
evo-support = {path = "../support", default_features = false}
runtime_io = { package = "sr-io", git = "https://github.com/paritytech/substrate", default-features = false }
session = { package ="srml-session", git = "https://github.com/paritytech/substrate", default-features = false }
consensus = { package ="srml-consensus", git = "https://github.com/paritytech/substrate", default-features = false }

[dev-dependencies]
ring = { package = "evo-ring", path = "../token/ring"}
kton = { package = "evo-kton", path = "../token/kton"}

[features]
default = ["std"]
std = [
"serde/std",
"serde_derive",
"safe-mix/std",
"parity-codec/std",
"parity-codec-derive/std",
"substrate-primitives/std",
"rstd/std",
"srml-support/std",
"balances/std",
"primitives/std",
"system/std",
"timestamp/std",
"session/std",
"consensus/std",
]
Loading

0 comments on commit 2bcf07c

Please sign in to comment.