difftreelog
Move coeff to common
in: master
4 files changed
runtime/common/src/constants.rsdiffbeforeafterboth--- a/runtime/common/src/constants.rs
+++ b/runtime/common/src/constants.rs
@@ -14,6 +14,8 @@
pub const HOURS: BlockNumber = MINUTES * 60;
pub const DAYS: BlockNumber = HOURS * 24;
+pub const WEIGHT_TO_FEE_COEFF: u32 = 142_688_000;
+
/// We assume that ~10% of the block weight is consumed by `on_initalize` handlers.
/// This is used to limit the maximal weight of a single extrinsic.
pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);
runtime/opal/src/lib.rsdiffbeforeafterboth467 fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {467 fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {468 smallvec!(WeightToFeeCoefficient {468 smallvec!(WeightToFeeCoefficient {469 // Targeting 0.1 Unique per NFT transfer469 // Targeting 0.1 Unique per NFT transfer470 coeff_integer: 142_688_000u32.into(),470 coeff_integer: WEIGHT_TO_FEE_COEFF.into(),471 coeff_frac: Perbill::zero(),471 coeff_frac: Perbill::zero(),472 negative: false,472 negative: false,473 degree: 1,473 degree: 1,runtime/quartz/src/lib.rsdiffbeforeafterboth--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -467,7 +467,7 @@
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
smallvec!(WeightToFeeCoefficient {
// Targeting 0.1 Unique per NFT transfer
- coeff_integer: 142_688_000u32.into(),
+ coeff_integer: WEIGHT_TO_FEE_COEFF.into(),
coeff_frac: Perbill::zero(),
negative: false,
degree: 1,
runtime/unique/src/lib.rsdiffbeforeafterboth--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -466,7 +466,7 @@
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
smallvec!(WeightToFeeCoefficient {
// Targeting 0.1 Unique per NFT transfer
- coeff_integer: 142_688_000u32.into(),
+ coeff_integer: WEIGHT_TO_FEE_COEFF.into(),
coeff_frac: Perbill::zero(),
negative: false,
degree: 1,