diff --git a/frame/evm/src/runner/mod.rs b/frame/evm/src/runner/mod.rs index 540bf46afc..25dc0bd80a 100644 --- a/frame/evm/src/runner/mod.rs +++ b/frame/evm/src/runner/mod.rs @@ -45,7 +45,7 @@ pub trait Runner { is_transactional: bool, weight_limit: Option, proof_size_base_cost: Option, - evm_config: &evm::Config, + evm_config: &evm::standard::Config, ) -> Result<(), RunnerError>; fn call( @@ -62,7 +62,7 @@ pub trait Runner { validate: bool, weight_limit: Option, proof_size_base_cost: Option, - config: &evm::Config, + config: &evm::standard::Config, ) -> Result>; fn create( @@ -78,7 +78,7 @@ pub trait Runner { validate: bool, weight_limit: Option, proof_size_base_cost: Option, - config: &evm::Config, + config: &evm::standard::Config, ) -> Result>; fn create2( @@ -95,6 +95,6 @@ pub trait Runner { validate: bool, weight_limit: Option, proof_size_base_cost: Option, - config: &evm::Config, + config: &evm::standard::Config, ) -> Result>; } diff --git a/precompiles/src/evm/costs.rs b/precompiles/src/evm/costs.rs index ac0d5b9198..776ccdae1d 100644 --- a/precompiles/src/evm/costs.rs +++ b/precompiles/src/evm/costs.rs @@ -56,12 +56,16 @@ pub fn log_costs(topics: usize, data_len: usize) -> EvmResult { // Compute the cost of doing a subcall. // Some parameters cannot be known in advance, so we estimate the worst possible cost. -pub fn call_cost(value: U256, config: &evm::Config) -> u64 { +pub fn call_cost(value: U256, config: &evm::standard::Config) -> u64 { // Copied from EVM code since not public. pub const G_CALLVALUE: u64 = 9000; pub const G_NEWACCOUNT: u64 = 25000; - fn address_access_cost(is_cold: bool, regular_value: u64, config: &evm::Config) -> u64 { + fn address_access_cost( + is_cold: bool, + regular_value: u64, + config: &evm::standard::Config, + ) -> u64 { if config.increase_state_access_gas { if is_cold { config.gas_account_access_cold @@ -85,7 +89,7 @@ pub fn call_cost(value: U256, config: &evm::Config) -> u64 { is_call_or_staticcall: bool, new_account: bool, transfers_value: bool, - config: &evm::Config, + config: &evm::standard::Config, ) -> u64 { let eip161 = !config.empty_considered_exists; if is_call_or_staticcall { diff --git a/precompiles/src/testing/handle.rs b/precompiles/src/testing/handle.rs index da6c2e286b..3ac0c7c720 100644 --- a/precompiles/src/testing/handle.rs +++ b/precompiles/src/testing/handle.rs @@ -117,7 +117,7 @@ impl PrecompileHandle for MockHandle { if self .record_cost(crate::evm::costs::call_cost( context.apparent_value, - &evm::Config::london(), + &evm::standard::Config::london(), )) .is_err() { diff --git a/primitives/evm/src/validation.rs b/primitives/evm/src/validation.rs index 5d4cf3fe4d..7c511d3577 100644 --- a/primitives/evm/src/validation.rs +++ b/primitives/evm/src/validation.rs @@ -20,9 +20,9 @@ use alloc::vec::Vec; use evm::standard::GasometerState; use frame_support::weights::Weight; -use sp_core::{H160, H256, U256}; use scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; +use sp_core::{H160, H256, U256}; #[derive(Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] pub struct Account {