Skip to content

Commit

Permalink
complete basic logic of ring and kton
Browse files Browse the repository at this point in the history
  • Loading branch information
sekisamu committed May 17, 2019
1 parent 800abde commit e75bad9
Show file tree
Hide file tree
Showing 17 changed files with 422 additions and 76 deletions.
29 changes: 27 additions & 2 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
error-chain = '0.12'
exit-future = '0.1'
futures = '0.1'
hex-literal = '0.1'
hex-literal = '0.2'
log = '0.4'
parity-codec = '3.3'
parking_lot = '0.7.1'
Expand Down Expand Up @@ -70,6 +70,7 @@ members = [
"srml/token/sdr",
"srml/token/ring",
"srml/token/kton",
"srml/try",
]
exclude = ["runtime/wasm"]

Expand Down
2 changes: 1 addition & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ construct_runtime!(
TemplateModule: template::{Module, Call, Storage, Event<T>},
Sdr: sdr::{Module, Call, Storage, Event<T>},
Ring: ring,
Kton: kton::{Module, Call, Storage, Event<T>},
Kton: kton::{Module, Call, Config<T>, Storage, Event<T>},
}
);

Expand Down
2 changes: 1 addition & 1 deletion runtime/src/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub trait Trait: system::Trait {
type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
}

/// This module's storage items.

decl_storage! {
trait Store for Module<T: Trait> as TemplateModule {
// Just a dummy storage item.
Expand Down
23 changes: 22 additions & 1 deletion runtime/wasm/Cargo.lock

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

9 changes: 6 additions & 3 deletions src/chain_spec.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use primitives::{ed25519, sr25519, Pair};
use primitives::{ed25519, sr25519, Pair, crypto::UncheckedInto};
use node_template_runtime::{
AccountId, GenesisConfig, ConsensusConfig, TimestampConfig, BalancesConfig,
SudoConfig, IndicesConfig, RingConfig,
SudoConfig, IndicesConfig, RingConfig, KtonConfig
};
use substrate_service;

use hex_literal::hex;
use ed25519::Public as AuthorityId;

// Note this is the URL for the telemetry server
Expand Down Expand Up @@ -124,5 +124,8 @@ fn testnet_genesis(initial_authorities: Vec<AuthorityId>, endowed_accounts: Vec<
balances: endowed_accounts.iter().cloned().map(|k|(k, 1 << 60)).collect(),
vesting: vec![],
}),
kton: Some(KtonConfig {
sys_account: hex!["0000000000000000000000000000000000000000000000000000000000000001"].unchecked_into(),
}),
}
}
2 changes: 2 additions & 0 deletions srml/support/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ Zero, SimpleArithmetic, As, StaticLookup, Member, CheckedAdd, CheckedSub,
MaybeSerializeDebug, Saturating
};
use rstd::{prelude::*, vec};

// general interface
4 changes: 3 additions & 1 deletion srml/token/kton/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Evolution Land <[email protected]>"]
edition = "2018"

[dependencies]
hex-literal = "0.1.0"
hex-literal = "0.2.0"
serde = { version = "1.0", default-features = false }
serde_derive = { version = "1.0", optional = true }
safe-mix = { version = "1.0", default-features = false}
Expand All @@ -20,6 +20,7 @@ srml-system = { git = "https://github.com/paritytech/substrate", default-feature
srml-balances = { git = "https://github.com/paritytech/substrate", default_features = false }
srml-timestamp = { git = "https://github.com/paritytech/substrate", default_features = false }
evo-support = {path = "../../support", default_features = false}
sr-io = { git = "https://github.com/paritytech/substrate", default-features = false }

[features]
default = ["std"]
Expand All @@ -31,6 +32,7 @@ std = [
"parity-codec-derive/std",
"substrate-primitives/std",
"sr-std/std",
"sr-io/std",
"srml-support/std",
"srml-balances/std",
"sr-primitives/std",
Expand Down
Loading

0 comments on commit e75bad9

Please sign in to comment.