Skip to content

Commit

Permalink
Feature/use const fee multiplier (#110)
Browse files Browse the repository at this point in the history
* Use ConstFeeMultiplier instead of SlowAdjustingFeeUpdate for FeeMultiplierUpdate

* Version bump
  • Loading branch information
Mihajlo-Pavlovic authored Nov 4, 2024
1 parent 1415d59 commit 6e61493
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "neuroweb-runtime"
version = "1.5.2"
version = "1.5.3"
authors = ["TraceLabs"]
description = "NeuroWeb Runtime - Cumulus FRAME-based Substrate Runtime"
license = "GPL-3.0-only"
Expand Down
10 changes: 6 additions & 4 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use sp_runtime::{
traits::{
AccountIdConversion, IdentityLookup, BlakeTwo256, Block as BlockT,
ConvertInto, DispatchInfoOf, Dispatchable, IdentifyAccount,
PostDispatchInfoOf, UniqueSaturatedInto, Verify,
PostDispatchInfoOf, UniqueSaturatedInto, Verify, One
},
transaction_validity::{
TransactionSource, TransactionValidity, TransactionValidityError
Expand Down Expand Up @@ -57,14 +57,15 @@ use frame_system::{
};
pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
pub use sp_runtime::{MultiAddress, Perbill, Permill};
use pallet_transaction_payment::{ConstFeeMultiplier, Multiplier};
use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight};
use xcm_config::{XcmOriginToTransactDispatchOrigin};

#[cfg(any(feature = "std", test))]
pub use sp_runtime::BuildStorage;

// Polkadot Imports
use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate};
use polkadot_runtime_common::BlockHashCount;
use cumulus_primitives_core::{AggregateMessageOrigin, ParaId};
use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling};
use polkadot_runtime_common::xcm_sender::NoPriceForMessageDelivery;
Expand Down Expand Up @@ -141,7 +142,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("origintrail-parachain"),
impl_name: create_runtime_str!("neuroweb"),
authoring_version: 1,
spec_version: 136,
spec_version: 137,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down Expand Up @@ -424,14 +425,15 @@ impl OnUnbalanced<Credit<AccountId, Balances>> for DealWithFees
parameter_types! {
/// Relay Chain `TransactionByteFee` / 10
pub const TransactionByteFee: Balance = 10 * MICROOTP;
pub FeeMultiplier: Multiplier = Multiplier::one();
}

impl pallet_transaction_payment::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type OnChargeTransaction = pallet_transaction_payment::FungibleAdapter<Balances, DealWithFees>;
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
type WeightToFee = WeightToFee;
type FeeMultiplierUpdate = SlowAdjustingFeeUpdate<Self>;
type FeeMultiplierUpdate = ConstFeeMultiplier<FeeMultiplier>;
type OperationalFeeMultiplier = ConstU8<5>;
}

Expand Down

0 comments on commit 6e61493

Please sign in to comment.