git.delta.rocks / unique-network / refs/commits / 7aeac1934bd9

difftreelog

Move min gas price to common

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

4 files changed

modifiedruntime/common/src/constants.rsdiffbeforeafterboth
2121
22pub const WEIGHT_TO_FEE_COEFF: u32 = 142_688_000;22pub const WEIGHT_TO_FEE_COEFF: u32 = 142_688_000;
23
24// Targeting 0.15 UNQ per transfer
25pub const MIN_GAS_PRICE: u64 = 1_018_751_825_264;
2326
24/// We assume that ~10% of the block weight is consumed by `on_initalize` handlers.27/// We assume that ~10% of the block weight is consumed by `on_initalize` handlers.
25/// This is used to limit the maximal weight of a single extrinsic.28/// This is used to limit the maximal weight of a single extrinsic.
modifiedruntime/opal/src/lib.rsdiffbeforeafterboth
226pub struct FixedFee;226pub struct FixedFee;
227impl FeeCalculator for FixedFee {227impl FeeCalculator for FixedFee {
228 fn min_gas_price() -> U256 {228 fn min_gas_price() -> U256 {
229 // Targeting 0.15 UNQ per transfer
230 1_018_751_825_264u64.into()229 MIN_GAS_PRICE.into()
231 }230 }
232}231}
233232
modifiedruntime/quartz/src/lib.rsdiffbeforeafterboth
226pub struct FixedFee;226pub struct FixedFee;
227impl FeeCalculator for FixedFee {227impl FeeCalculator for FixedFee {
228 fn min_gas_price() -> U256 {228 fn min_gas_price() -> U256 {
229 // Targeting 0.15 UNQ per transfer
230 1_018_751_825_264u64.into()229 MIN_GAS_PRICE.into()
231 }230 }
232}231}
233232
modifiedruntime/unique/src/lib.rsdiffbeforeafterboth
225pub struct FixedFee;225pub struct FixedFee;
226impl FeeCalculator for FixedFee {226impl FeeCalculator for FixedFee {
227 fn min_gas_price() -> U256 {227 fn min_gas_price() -> U256 {
228 // Targeting 0.15 UNQ per transfer
229 1_018_751_825_264u64.into()228 MIN_GAS_PRICE.into()
230 }229 }
231}230}
232231