From 66ae2044148bea94892789b53397c9a99b490b68 Mon Sep 17 00:00:00 2001 From: Dino Pacandi Date: Wed, 4 Dec 2024 15:17:09 +0100 Subject: [PATCH] Rename --- primitives/src/evm.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/primitives/src/evm.rs b/primitives/src/evm.rs index 5cbfde708..29874ab19 100644 --- a/primitives/src/evm.rs +++ b/primitives/src/evm.rs @@ -156,20 +156,23 @@ impl
UnifiedAddress
{ /// Two separate `OnUnbalanced` handers are used: /// - `UOF` for the fee /// - `OUT` for the tip -pub struct EVMFungibleAdapterWrapper(core::marker::PhantomData<(F, OUF, OUT)>); -impl OnChargeEVMTransaction for EVMFungibleAdapterWrapper +pub struct EVMFungibleAdapterWrapper( + core::marker::PhantomData<(F, FeeHandler, TipHandler)>, +); +impl OnChargeEVMTransaction + for EVMFungibleAdapterWrapper where T: pallet_evm::Config, F: Balanced, - OUF: OnUnbalanced>, - OUT: OnUnbalanced>, + FeeHandler: OnUnbalanced>, + TipHandler: OnUnbalanced>, U256: UniqueSaturatedInto<::AccountId>>::Balance>, { // Kept type as Option to satisfy bound of Default type LiquidityInfo = Option>; fn withdraw_fee(who: &H160, fee: U256) -> Result> { - pallet_evm::EVMFungibleAdapter::::withdraw_fee(who, fee) + pallet_evm::EVMFungibleAdapter::::withdraw_fee(who, fee) } fn correct_and_deposit_fee( @@ -178,7 +181,7 @@ where base_fee: U256, already_withdrawn: Self::LiquidityInfo, ) -> Self::LiquidityInfo { - as OnChargeEVMTransaction>::correct_and_deposit_fee( + as OnChargeEVMTransaction>::correct_and_deposit_fee( who, corrected_fee, base_fee, @@ -188,7 +191,7 @@ where fn pay_priority_fee(tip: Self::LiquidityInfo) { if let Some(tip) = tip { - OUT::on_unbalanceds(Some(tip).into_iter()); + TipHandler::on_unbalanceds(Some(tip).into_iter()); } } }