Skip to content

Commit

Permalink
remove assets key
Browse files Browse the repository at this point in the history
  • Loading branch information
mclyk committed Oct 11, 2022
1 parent 6531c3e commit 15bbaf4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 174 deletions.
49 changes: 2 additions & 47 deletions runtime/heiko/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ pub mod time {
/// Fee-related.
pub mod fee {
use frame_support::weights::{
constants::{ExtrinsicBaseWeight, WEIGHT_PER_SECOND},
WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial,
constants::ExtrinsicBaseWeight, WeightToFeeCoefficient, WeightToFeeCoefficients,
WeightToFeePolynomial,
};
use primitives::Balance;
use smallvec::smallvec;
Expand Down Expand Up @@ -82,13 +82,6 @@ pub mod fee {
}]
}
}

pub fn ksm_per_second() -> u128 {
let base_weight = Balance::from(ExtrinsicBaseWeight::get());
let base_tx_per_second = (WEIGHT_PER_SECOND as u128) / base_weight;
let hko_per_second = base_tx_per_second * super::currency::CENTS / 10;
hko_per_second / 50 //almost 250_000_000_000~=1/4 WEIGHT_PER_SECOND in polkadot-v0.9.28
}
}

/// Parachains-related
Expand All @@ -98,42 +91,4 @@ pub mod paras {
pub const PALLET_INSTANCE: u8 = 50;
pub const USDT_KEY: u128 = 1984;
}

pub mod karura {
pub const ID: u32 = 2000;
pub const KAR_KEY: &[u8] = &[0, 128];
pub const KUSD_KEY: &[u8] = &[0, 129];
pub const LKSM_KEY: &[u8] = &[0, 131];
}

pub mod moonriver {
pub const ID: u32 = 2023;
pub const MOVR_KEY: u8 = 10;
}

pub mod khala {
pub const ID: u32 = 2004;
}

pub mod shiden {
pub const ID: u32 = 2007;
}

pub mod calamari {
pub const ID: u32 = 2084;
}

pub mod kintsugi {
pub const ID: u32 = 2092;
pub const KBTC_KEY: &[u8] = &[0, 11];
pub const KINT_KEY: &[u8] = &[0, 12];
}

pub mod genshiro {
pub const ID: u32 = 2024;
}

pub mod turing {
pub const ID: u32 = 2114;
}
}
42 changes: 2 additions & 40 deletions runtime/kerria/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ pub mod time {
/// Fee-related.
pub mod fee {
use frame_support::weights::{
constants::{ExtrinsicBaseWeight, WEIGHT_PER_SECOND},
WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial,
constants::ExtrinsicBaseWeight, WeightToFeeCoefficient, WeightToFeeCoefficients,
WeightToFeePolynomial,
};
use primitives::Balance;
use smallvec::smallvec;
Expand Down Expand Up @@ -82,49 +82,11 @@ pub mod fee {
}]
}
}

pub fn dot_per_second() -> u128 {
let base_weight = Balance::from(ExtrinsicBaseWeight::get());
let base_tx_per_second = (WEIGHT_PER_SECOND as u128) / base_weight;
let para_per_second = base_tx_per_second * super::currency::CENTS / 10;
para_per_second / 50
}
}

/// Parachains-related
pub mod paras {
pub mod statemint {
pub const ID: u32 = 1000;
}

pub mod acala {
pub const ID: u32 = 2000;
pub const ACA_KEY: &[u8] = &[0, 0];
pub const AUSD_KEY: &[u8] = &[0, 1];
pub const LDOT_KEY: &[u8] = &[0, 3];
pub const LCDOT_KEY: &[u8] = &[4, 13];
}

pub mod moonbeam {
pub const ID: u32 = 2004;
pub const GLMR_KEY: u8 = 10;
}

pub mod astar {
pub const ID: u32 = 2006;
}

pub mod phala {
pub const ID: u32 = 2035;
}

pub mod interlay {
pub const ID: u32 = 2032;
pub const IBTC_KEY: &[u8] = &[0, 1];
pub const INTR_KEY: &[u8] = &[0, 2];
}

pub mod equilibrium {
pub const ID: u32 = 2011;
}
}
42 changes: 2 additions & 40 deletions runtime/parallel/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ pub mod time {
/// Fee-related.
pub mod fee {
use frame_support::weights::{
constants::{ExtrinsicBaseWeight, WEIGHT_PER_SECOND},
WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial,
constants::ExtrinsicBaseWeight, WeightToFeeCoefficient, WeightToFeeCoefficients,
WeightToFeePolynomial,
};
use primitives::Balance;
use smallvec::smallvec;
Expand Down Expand Up @@ -82,49 +82,11 @@ pub mod fee {
}]
}
}

pub fn dot_per_second() -> u128 {
let base_weight = Balance::from(ExtrinsicBaseWeight::get());
let base_tx_per_second = (WEIGHT_PER_SECOND as u128) / base_weight;
let para_per_second = base_tx_per_second * super::currency::CENTS / 10;
para_per_second / 50
}
}

/// Parachains-related
pub mod paras {
pub mod statemint {
pub const ID: u32 = 1000;
}

pub mod acala {
pub const ID: u32 = 2000;
pub const ACA_KEY: &[u8] = &[0, 0];
pub const AUSD_KEY: &[u8] = &[0, 1];
pub const LDOT_KEY: &[u8] = &[0, 3];
pub const LCDOT_KEY: &[u8] = &[4, 13, 0, 0, 0];
}

pub mod moonbeam {
pub const ID: u32 = 2004;
pub const GLMR_KEY: u8 = 10;
}

pub mod astar {
pub const ID: u32 = 2006;
}

pub mod phala {
pub const ID: u32 = 2035;
}

pub mod interlay {
pub const ID: u32 = 2032;
pub const IBTC_KEY: &[u8] = &[0, 1];
pub const INTR_KEY: &[u8] = &[0, 2];
}

pub mod equilibrium {
pub const ID: u32 = 2011;
}
}
49 changes: 2 additions & 47 deletions runtime/vanilla/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ pub mod time {
/// Fee-related.
pub mod fee {
use frame_support::weights::{
constants::{ExtrinsicBaseWeight, WEIGHT_PER_SECOND},
WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial,
constants::ExtrinsicBaseWeight, WeightToFeeCoefficient, WeightToFeeCoefficients,
WeightToFeePolynomial,
};
use primitives::Balance;
use smallvec::smallvec;
Expand Down Expand Up @@ -82,13 +82,6 @@ pub mod fee {
}]
}
}

pub fn ksm_per_second() -> u128 {
let base_weight = Balance::from(ExtrinsicBaseWeight::get());
let base_tx_per_second = (WEIGHT_PER_SECOND as u128) / base_weight;
let hko_per_second = base_tx_per_second * super::currency::CENTS / 10;
hko_per_second / 50
}
}

/// Parachains-related
Expand All @@ -98,42 +91,4 @@ pub mod paras {
pub const PALLET_INSTANCE: u8 = 50;
pub const USDT_KEY: u128 = 1984;
}

pub mod karura {
pub const ID: u32 = 2000;
pub const KAR_KEY: &[u8] = &[0, 128];
pub const KUSD_KEY: &[u8] = &[0, 129];
pub const LKSM_KEY: &[u8] = &[0, 131];
}

pub mod moonriver {
pub const ID: u32 = 1000;
pub const MOVR_KEY: u8 = 3;
}

pub mod khala {
pub const ID: u32 = 2004;
}

pub mod shiden {
pub const ID: u32 = 2007;
}

pub mod calamari {
pub const ID: u32 = 2084;
}

pub mod kintsugi {
pub const ID: u32 = 2092;
pub const KBTC_KEY: &[u8] = &[0, 11];
pub const KINT_KEY: &[u8] = &[0, 12];
}

pub mod genshiro {
pub const ID: u32 = 2024;
}

pub mod turing {
pub const ID: u32 = 2114;
}
}

0 comments on commit 15bbaf4

Please sign in to comment.