diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 8cb573eb..7ed443a4 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -150,7 +150,7 @@ pub const MILLISECS_PER_BLOCK: u64 = prod_or_fast!(15_000, 5_000); pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; -pub const MILLI_CTC: u128 = 1_000_000_000_000_000; +pub const CENTS: u128 = CTC / 100; // WARNING: the next should be defined on a single line b/c of // the assertions made in .github/check-for-changes-in-epoch-duration.sh @@ -341,8 +341,8 @@ impl WeightToFeePolynomial for WeightToCtcFee { type Balance = Balance; fn polynomial() -> frame_support::weights::WeightToFeeCoefficients { - let p = MILLI_CTC / 2; - let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); + let p = CENTS; + let q = 10 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); smallvec::smallvec![WeightToFeeCoefficient { degree: 1, negative: false, @@ -352,8 +352,11 @@ impl WeightToFeePolynomial for WeightToCtcFee { } } +pub const TRANSACTION_BYTE_FEE: Balance = 10 * CENTS / 1_000; + parameter_types! { pub FeeMultiplier: Multiplier = Multiplier::one(); + pub const TransactionByteFee: Balance = TRANSACTION_BYTE_FEE; } impl pallet_transaction_payment::Config for Runtime { @@ -361,7 +364,7 @@ impl pallet_transaction_payment::Config for Runtime { type OnChargeTransaction = CurrencyAdapter; type OperationalFeeMultiplier = ConstU8<1u8>; type WeightToFee = WeightToCtcFee; - type LengthToFee = ConstantMultiplier>; + type LengthToFee = ConstantMultiplier; type FeeMultiplierUpdate = ConstFeeMultiplier; } diff --git a/runtime/src/version.rs b/runtime/src/version.rs index 67ebe335..9ce651f3 100644 --- a/runtime/src/version.rs +++ b/runtime/src/version.rs @@ -7,7 +7,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("creditcoin3"), impl_name: create_runtime_str!("creditcoin3"), authoring_version: 3, - spec_version: 38, + spec_version: 39, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2,