@@ -35,7 +35,7 @@ use sp_runtime::{
35
35
DispatchResult , traits:: { UniqueSaturatedInto , AccountIdConversion , SaturatedConversion } ,
36
36
} ;
37
37
use sha3:: { Digest , Keccak256 } ;
38
- use evm:: { ExitReason , ExitSucceed , ExitError } ;
38
+ use evm:: { ExitReason , ExitSucceed , ExitError , Config } ;
39
39
use evm:: executor:: StackExecutor ;
40
40
use evm:: backend:: ApplyBackend ;
41
41
@@ -116,6 +116,8 @@ impl Precompiles for () {
116
116
}
117
117
}
118
118
119
+ static ISTANBUL_CONFIG : Config = Config :: istanbul ( ) ;
120
+
119
121
/// EVM module trait
120
122
pub trait Trait : frame_system:: Trait + pallet_timestamp:: Trait {
121
123
/// Calculator for current gas price.
@@ -128,6 +130,11 @@ pub trait Trait: frame_system::Trait + pallet_timestamp::Trait {
128
130
type Event : From < Event > + Into < <Self as frame_system:: Trait >:: Event > ;
129
131
/// Precompiles associated with this EVM engine.
130
132
type Precompiles : Precompiles ;
133
+
134
+ /// EVM config used in the module.
135
+ fn config ( ) -> & ' static Config {
136
+ & ISTANBUL_CONFIG
137
+ }
131
138
}
132
139
133
140
decl_storage ! {
@@ -381,7 +388,7 @@ impl<T: Trait> Module<T> {
381
388
let mut executor = StackExecutor :: new_with_precompile (
382
389
& backend,
383
390
gas_limit as usize ,
384
- & backend :: GASOMETER_CONFIG ,
391
+ T :: config ( ) ,
385
392
T :: Precompiles :: execute,
386
393
) ;
387
394
0 commit comments