@@ -5,6 +5,7 @@ const path = require('path');
55const istanbul = require ( 'sc-istanbul' ) ;
66const assert = require ( 'assert' ) ;
77const _ = require ( 'lodash/lang' ) ;
8+ const { hardforkGte, HardforkName } = require ( 'hardhat/internal/util/hardforks' ) ;
89
910const ConfigValidator = require ( './validator' ) ;
1011const Instrumenter = require ( './instrumenter' ) ;
@@ -17,7 +18,7 @@ const AbiUtils = require('./abi');
1718 * Coverage Runner
1819 */
1920class API {
20- constructor ( config = { } ) {
21+ constructor ( config = { } , hardfork ) {
2122 this . validator = new ConfigValidator ( ) ;
2223 this . abiUtils = new AbiUtils ( ) ;
2324 this . config = config || { } ;
@@ -47,8 +48,11 @@ class API {
4748 this . skipFiles = config . skipFiles || [ ] ;
4849
4950 this . log = config . log || console . log ;
50- this . gasLimit = 0xffffffffff // default "gas sent" with transactions
51- this . gasLimitNumber = 0x1fffffffffffff ; // block gas limit for Hardhat
51+ const isEip7825Enabled = hardfork !== undefined && HardforkName . OSAKA !== undefined
52+ ? hardforkGte ( hardfork , HardforkName . OSAKA )
53+ : false ;
54+ this . gasLimit = isEip7825Enabled ? 2 ** 24 : 0xffffffffff // default "gas sent" with transactions
55+ this . gasLimitNumber = 0x1fffffffffffff ; // block gas limit for Hardhat
5256 this . gasPrice = 0x01 ;
5357
5458 this . istanbulFolder = config . istanbulFolder || false ;
0 commit comments