11const { subtask } = require ( "hardhat/config" ) ;
22const { TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS } = require ( "hardhat/builtin-tasks/task-names" ) ;
33
4+ const isTest = process . env . IS_TEST === "true" || process . env . CI === "true" ;
5+
46subtask ( TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS ) . setAction ( async ( _ : any , __ : any , runSuper : any ) => {
57 const paths = await runSuper ( ) ;
68
79 // Filter out files that cause problems when using "paris" hardfork (currently used to compile everything when IS_TEST=true)
810 // Reference: https://github.com/NomicFoundation/hardhat/issues/2306#issuecomment-1039452928
9- if ( process . env . IS_TEST === "true" ) {
11+ if ( isTest ) {
1012 return paths . filter ( ( p : any ) => {
1113 return (
1214 ! p . includes ( "contracts/periphery/mintburn" ) &&
@@ -69,8 +71,6 @@ const tasks = [
6971// eslint-disable-next-line node/no-missing-require
7072tasks . forEach ( ( task ) => require ( `./tasks/${ task } ` ) ) ;
7173
72- const isTest = process . env . IS_TEST === "true" ;
73-
7474// To compile with zksolc, `hardhat` must be the default network and its `zksync` property must be true.
7575// So we allow the caller to set this environment variable to toggle compiling zk contracts or not.
7676// TODO: Figure out way to only compile specific contracts intended to be deployed on ZkSync (e.g. ZkSync_SpokePool) if
@@ -81,7 +81,7 @@ const solcVersion = "0.8.30";
8181
8282// Hardhat 2.14.0 doesn't support prague yet, so we use paris instead (need to upgrade to v3 to use prague)
8383const evmVersion = isTest ? "paris" : "prague" ;
84- const revertStrings = isTest || process . env . CI === "true" ? "debug" : "strip" ;
84+ const revertStrings = isTest ? "debug" : "strip" ;
8585
8686// Compilation settings are overridden for large contracts to allow them to compile without going over the bytecode
8787// limit.
0 commit comments