diff --git a/frame/evm/precompile/dispatch/src/mock.rs b/frame/evm/precompile/dispatch/src/mock.rs index 2c6c0346a7..d5202e906c 100644 --- a/frame/evm/precompile/dispatch/src/mock.rs +++ b/frame/evm/precompile/dispatch/src/mock.rs @@ -145,11 +145,9 @@ impl pallet_evm::Config for Test { type WeightPerGas = WeightPerGas; type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping; - type CallOrigin = - EnsureAddressRoot<::AccountId>; + type CallOrigin = EnsureAddressRoot<::AccountId>; - type WithdrawOrigin = - EnsureAddressNever<::AccountId>; + type WithdrawOrigin = EnsureAddressNever<::AccountId>; type AddressMapping = IdentityAddressMapping; type Currency = Balances; diff --git a/frame/evm/src/lib.rs b/frame/evm/src/lib.rs index 56dc414a60..fddcc3455b 100644 --- a/frame/evm/src/lib.rs +++ b/frame/evm/src/lib.rs @@ -128,16 +128,12 @@ pub mod pallet { /// Allow the origin to call on behalf of given address. type CallOrigin: EnsureAddressOrigin; /// Allow the origin to withdraw on behalf of given address. - type WithdrawOrigin: EnsureAddressOrigin< - Self::RuntimeOrigin, - Success = ::AccountId, - >; + type WithdrawOrigin: EnsureAddressOrigin::AccountId>; /// Mapping from address to account id. type AddressMapping: AddressMapping<::AccountId>; /// Currency type for withdraw and balance storage. - type Currency: Currency<::AccountId> - + Inspect<::AccountId>; + type Currency: Currency<::AccountId> + Inspect<::AccountId>; /// The overarching event type. type RuntimeEvent: From> + IsType<::RuntimeEvent>; @@ -518,14 +514,12 @@ pub mod pallet { } /// Type alias for currency balance. -pub type BalanceOf = <::Currency as Currency< - <::AccountProvider as AccountProvider>::AccountId, ->>::Balance; +pub type BalanceOf = + <::Currency as Currency<<::AccountProvider as AccountProvider>::AccountId>>::Balance; /// Type alias for negative imbalance during fees -type NegativeImbalanceOf = ::AccountProvider as AccountProvider>::AccountId, ->>::NegativeImbalance; +type NegativeImbalanceOf = + ::AccountProvider as AccountProvider>::AccountId>>::NegativeImbalance; pub trait EnsureAddressOrigin { /// Success return type. diff --git a/frame/evm/src/mock.rs b/frame/evm/src/mock.rs index e6e5d82264..31261c5d77 100644 --- a/frame/evm/src/mock.rs +++ b/frame/evm/src/mock.rs @@ -138,11 +138,9 @@ impl crate::Config for Test { type WeightPerGas = WeightPerGas; type BlockHashMapping = crate::SubstrateBlockHashMapping; - type CallOrigin = - EnsureAddressRoot<::AccountId>; + type CallOrigin = EnsureAddressRoot<::AccountId>; - type WithdrawOrigin = - EnsureAddressNever<::AccountId>; + type WithdrawOrigin = EnsureAddressNever<::AccountId>; type AddressMapping = IdentityAddressMapping; type Currency = Balances;