git.delta.rocks / unique-network / refs/commits / 9190bc325af2

difftreelog

Move coeff to common

Daniel Shiposha2022-03-14parent: #8f1c92c.patch.diff
in: master

4 files changed

modifiedruntime/common/src/constants.rsdiffbeforeafterboth
14pub const HOURS: BlockNumber = MINUTES * 60;14pub const HOURS: BlockNumber = MINUTES * 60;
15pub const DAYS: BlockNumber = HOURS * 24;15pub const DAYS: BlockNumber = HOURS * 24;
16
17pub const WEIGHT_TO_FEE_COEFF: u32 = 142_688_000;
1618
17/// We assume that ~10% of the block weight is consumed by `on_initalize` handlers.19/// We assume that ~10% of the block weight is consumed by `on_initalize` handlers.
18/// This is used to limit the maximal weight of a single extrinsic.20/// This is used to limit the maximal weight of a single extrinsic.
modifiedruntime/opal/src/lib.rsdiffbeforeafterboth
--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/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,
modifiedruntime/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,
modifiedruntime/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,