diff --git a/runtime/moonbase/src/lib.rs b/runtime/moonbase/src/lib.rs index bd8036ff48..ab9a1db6c8 100644 --- a/runtime/moonbase/src/lib.rs +++ b/runtime/moonbase/src/lib.rs @@ -60,7 +60,7 @@ use frame_support::{ construct_runtime, dispatch::{DispatchClass, GetDispatchInfo, PostDispatchInfo}, ensure, - pallet_prelude::{DispatchResult}, + pallet_prelude::DispatchResult, parameter_types, traits::{ fungible::{Balanced, Credit, HoldConsideration, Inspect}, @@ -89,7 +89,6 @@ use pallet_evm::{ OnChargeEVMTransaction as OnChargeEVMTransactionT, Runner, }; use pallet_transaction_payment::{FungibleAdapter, Multiplier, TargetedFeeAdjustment}; -use pallet_treasury::TreasuryAccountId; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use runtime_params::*; use scale_info::TypeInfo; diff --git a/runtime/moonbase/tests/integration_test.rs b/runtime/moonbase/tests/integration_test.rs index 1807647199..e9ab621fb2 100644 --- a/runtime/moonbase/tests/integration_test.rs +++ b/runtime/moonbase/tests/integration_test.rs @@ -2797,7 +2797,8 @@ fn substrate_based_fees_zero_txn_costs_only_base_extrinsic() { #[test] fn deal_with_fees_handles_tip() { use frame_support::traits::OnUnbalanced; - use moonbase_runtime::{DealWithSubstrateFeesAndTip, Treasury}; + use moonbase_runtime::Treasury; + use moonbeam_runtime_common::deal_with_fees::DealWithSubstrateFeesAndTip; ExtBuilder::default().build().execute_with(|| { set_parachain_inherent_data(); @@ -2832,7 +2833,10 @@ fn deal_with_fees_handles_tip() { assert_eq!(Balances::free_balance(&Treasury::account_id()), 0); // Step 3: Execute the fees handling logic. - DealWithSubstrateFeesAndTip::on_unbalanceds(vec![fee, tip].into_iter()); + DealWithSubstrateFeesAndTip::< + Runtime, + dynamic_params::runtime_config::FeesTreasuryProportion, + >::on_unbalanceds(vec![fee, tip].into_iter()); // Step 4: Compute the split between treasury and burned fees based on FeesTreasuryProportion (20%). let treasury_proportion = dynamic_params::runtime_config::FeesTreasuryProportion::get(); diff --git a/runtime/moonbeam/src/lib.rs b/runtime/moonbeam/src/lib.rs index 8f358b52d2..74be2eeeec 100644 --- a/runtime/moonbeam/src/lib.rs +++ b/runtime/moonbeam/src/lib.rs @@ -48,8 +48,7 @@ use frame_support::{ fungible::{Balanced, Credit, HoldConsideration, Inspect}, tokens::{PayFromAccount, UnityAssetBalanceConversion}, ConstBool, ConstU128, ConstU16, ConstU32, ConstU64, ConstU8, Contains, EitherOfDiverse, - EqualPrivilegeOnly, InstanceFilter, LinearStoragePrice, OnFinalize, - OnUnbalanced, + EqualPrivilegeOnly, InstanceFilter, LinearStoragePrice, OnFinalize, OnUnbalanced, }, weights::{ constants::WEIGHT_REF_TIME_PER_SECOND, ConstantMultiplier, Weight, WeightToFeeCoefficient, diff --git a/runtime/moonbeam/tests/integration_test.rs b/runtime/moonbeam/tests/integration_test.rs index e5012669cf..ec8d54e953 100644 --- a/runtime/moonbeam/tests/integration_test.rs +++ b/runtime/moonbeam/tests/integration_test.rs @@ -2618,7 +2618,8 @@ fn removed_precompiles() { #[test] fn deal_with_fees_handles_tip() { use frame_support::traits::OnUnbalanced; - use moonbeam_runtime::{DealWithSubstrateFeesAndTip, Treasury}; + use moonbeam_runtime::Treasury; + use moonbeam_runtime_common::deal_with_fees::DealWithSubstrateFeesAndTip; ExtBuilder::default().build().execute_with(|| { set_parachain_inherent_data(); @@ -2653,7 +2654,10 @@ fn deal_with_fees_handles_tip() { assert_eq!(Balances::free_balance(&Treasury::account_id()), 0); // Step 3: Execute the fees handling logic. - DealWithSubstrateFeesAndTip::on_unbalanceds(vec![fee, tip].into_iter()); + DealWithSubstrateFeesAndTip::< + Runtime, + dynamic_params::runtime_config::FeesTreasuryProportion, + >::on_unbalanceds(vec![fee, tip].into_iter()); // Step 4: Compute the split between treasury and burned fees based on FeesTreasuryProportion (20%). let treasury_proportion = dynamic_params::runtime_config::FeesTreasuryProportion::get(); diff --git a/runtime/moonriver/src/lib.rs b/runtime/moonriver/src/lib.rs index 3a378c87ff..f0e5062258 100644 --- a/runtime/moonriver/src/lib.rs +++ b/runtime/moonriver/src/lib.rs @@ -49,8 +49,7 @@ use frame_support::{ fungible::{Balanced, Credit, HoldConsideration, Inspect}, tokens::{PayFromAccount, UnityAssetBalanceConversion}, ConstBool, ConstU128, ConstU16, ConstU32, ConstU64, ConstU8, Contains, EitherOfDiverse, - EqualPrivilegeOnly, InstanceFilter, LinearStoragePrice, OnFinalize, - OnUnbalanced, + EqualPrivilegeOnly, InstanceFilter, LinearStoragePrice, OnFinalize, OnUnbalanced, }, weights::{ constants::WEIGHT_REF_TIME_PER_SECOND, ConstantMultiplier, Weight, WeightToFeeCoefficient, diff --git a/runtime/moonriver/tests/integration_test.rs b/runtime/moonriver/tests/integration_test.rs index 0f6603e050..148e14c2a6 100644 --- a/runtime/moonriver/tests/integration_test.rs +++ b/runtime/moonriver/tests/integration_test.rs @@ -2517,7 +2517,8 @@ fn removed_precompiles() { #[test] fn deal_with_fees_handles_tip() { use frame_support::traits::OnUnbalanced; - use moonriver_runtime::{DealWithSubstrateFeesAndTip, Treasury}; + use moonbeam_runtime_common::deal_with_fees::DealWithSubstrateFeesAndTip; + use moonriver_runtime::Treasury; ExtBuilder::default().build().execute_with(|| { set_parachain_inherent_data(); @@ -2552,7 +2553,10 @@ fn deal_with_fees_handles_tip() { assert_eq!(Balances::free_balance(&Treasury::account_id()), 0); // Step 3: Execute the fees handling logic. - DealWithSubstrateFeesAndTip::on_unbalanceds(vec![fee, tip].into_iter()); + DealWithSubstrateFeesAndTip::< + Runtime, + dynamic_params::runtime_config::FeesTreasuryProportion, + >::on_unbalanceds(vec![fee, tip].into_iter()); // Step 4: Compute the split between treasury and burned fees based on FeesTreasuryProportion (20%). let treasury_proportion = dynamic_params::runtime_config::FeesTreasuryProportion::get();