Unverified Commit c30e0000 authored by asynchronous rob's avatar asynchronous rob Committed by GitHub
Browse files

update to latest substrate (#141)

parent 08f76e05
Pipeline #31012 passed with stages
in 15 minutes and 57 seconds
This diff is collapsed.
......@@ -37,6 +37,7 @@ srml-system = { git = "https://github.com/paritytech/substrate", default-feature
srml-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false }
srml-treasury = { git = "https://github.com/paritytech/substrate", default-features = false }
srml-upgrade-key = { git = "https://github.com/paritytech/substrate", default-features = false }
srml-fees = { git = "https://github.com/paritytech/substrate", default-features = false }
sr-version = { git = "https://github.com/paritytech/substrate", default-features = false }
[dev-dependencies]
......@@ -74,6 +75,7 @@ std = [
"srml-timestamp/std",
"srml-treasury/std",
"srml-upgrade-key/std",
"srml-fees/std",
"sr-version/std",
"serde_derive",
"serde/std",
......
......@@ -65,6 +65,7 @@ extern crate srml_system as system;
extern crate srml_timestamp as timestamp;
extern crate srml_treasury as treasury;
extern crate srml_upgrade_key as upgrade_key;
extern crate srml_fees as fees;
extern crate polkadot_primitives as primitives;
......@@ -112,8 +113,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("polkadot"),
impl_name: create_runtime_str!("parity-polkadot"),
authoring_version: 1,
spec_version: 106,
impl_version: 0,
spec_version: 107,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
};
......@@ -241,6 +242,12 @@ impl claims::Trait for Runtime {
type Event = Event;
}
impl fees::Trait for Runtime {
type Event = Event;
type Amount = Balance;
type TransferAsset = Balances;
}
construct_runtime!(
pub enum Runtime with Log(InternalLog: DigestItem<Hash, SessionKey>) where
Block = Block,
......@@ -267,6 +274,7 @@ construct_runtime!(
Sudo: sudo,
UpgradeKey: upgrade_key,
Claims: claims,
Fees: fees::{Module, Storage, Config<T>, Event<T>},
}
);
......@@ -285,7 +293,7 @@ pub type UncheckedExtrinsic = generic::UncheckedMortalCompactExtrinsic<Address,
/// Extrinsic type that has already been checked.
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Nonce, Call>;
/// Executive: handles dispatch to the various modules.
pub type Executive = executive::Executive<Runtime, Block, system::ChainContext<Runtime>, Balances, AllModules>;
pub type Executive = executive::Executive<Runtime, Block, system::ChainContext<Runtime>, Fees, AllModules>;
impl_runtime_apis! {
impl client_api::Core<Block> for Runtime {
......
This diff is collapsed.
......@@ -21,7 +21,7 @@ use polkadot_runtime::{
GenesisConfig, ConsensusConfig, CouncilSeatsConfig, DemocracyConfig, TreasuryConfig,
SessionConfig, StakingConfig, TimestampConfig, BalancesConfig, Perbill,
CouncilVotingConfig, GrandpaConfig, UpgradeKeyConfig, SudoConfig, IndicesConfig,
ClaimsConfig, Permill
ClaimsConfig, FeesConfig, Permill
};
const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";
......@@ -63,8 +63,6 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
}),
balances: Some(BalancesConfig {
balances: endowed_accounts.iter().map(|&k| (k, 10_000_000 * DOLLARS)).collect(),
transaction_base_fee: 1 * CENTS,
transaction_byte_fee: 10 * MILLICENTS,
existential_deposit: 1 * DOLLARS,
transfer_fee: 1 * CENTS,
creation_fee: 1 * CENTS,
......@@ -134,6 +132,10 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
claims: Some(ClaimsConfig {
claims: vec![],
}),
fees: Some(FeesConfig {
transaction_base_fee: 1 * CENTS,
transaction_byte_fee: 10 * MILLICENTS,
}),
}
}
......@@ -171,8 +173,6 @@ fn testnet_genesis(initial_authorities: Vec<AuthorityId>, upgrade_key: H256) ->
ids: endowed_accounts.clone(),
}),
balances: Some(BalancesConfig {
transaction_base_fee: 1,
transaction_byte_fee: 0,
existential_deposit: 500,
transfer_fee: 0,
creation_fee: 0,
......@@ -238,6 +238,10 @@ fn testnet_genesis(initial_authorities: Vec<AuthorityId>, upgrade_key: H256) ->
claims: Some(ClaimsConfig {
claims: vec![],
}),
fees: Some(FeesConfig {
transaction_base_fee: 1,
transaction_byte_fee: 0,
})
}
}
......
......@@ -247,8 +247,6 @@ construct_service_factory! {
{ |config, executor| <LightComponents<Factory>>::new(config, executor) },
FullImportQueue = AuraImportQueue<
Self::Block,
FullClient<Self>,
NothingExtra,
>
{ |config: &mut FactoryFullConfiguration<Self>, client: Arc<FullClient<Self>>| {
let slot_duration = SlotDuration::get_or_compute(&*client)?;
......@@ -272,8 +270,6 @@ construct_service_factory! {
}},
LightImportQueue = AuraImportQueue<
Self::Block,
LightClient<Self>,
NothingExtra,
>
{ |config: &mut FactoryFullConfiguration<Self>, client: Arc<LightClient<Self>>| {
let slot_duration = SlotDuration::get_or_compute(&*client)?;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment