@@ -4,7 +4,7 @@ import { TASK_TEST } from 'hardhat/builtin-tasks/task-names'
44import glob from 'glob'
55import { cliOpts } from '../../cli/defaults'
66import fs from 'fs'
7- import { isL1 } from '../../gre/helpers/network '
7+ import { isL1 } from '../../gre/helpers/chain '
88import { runScriptWithHardhat } from 'hardhat/internal/util/scripts-runner'
99
1010const CONFIG_TESTS = 'e2e/deployment/config/**/*.test.ts'
@@ -13,7 +13,13 @@ const INIT_TESTS = 'e2e/deployment/init/**/*.test.ts'
1313// Built-in test & run tasks don't support GRE arguments
1414// so we pass them by overriding GRE config object
1515const setGraphConfig = async ( args : TaskArguments , hre : HardhatRuntimeEnvironment ) => {
16- const greArgs = [ 'graphConfig' , 'l1GraphConfig' , 'l2GraphConfig' , 'addressBook' ]
16+ const greArgs = [
17+ 'graphConfig' ,
18+ 'l1GraphConfig' ,
19+ 'l2GraphConfig' ,
20+ 'addressBook' ,
21+ 'disableSecureAccounts' ,
22+ ]
1723
1824 for ( const arg of greArgs ) {
1925 if ( args [ arg ] ) {
@@ -44,6 +50,7 @@ task('e2e', 'Run all e2e tests')
4450 } )
4551
4652task ( 'e2e:config' , 'Run deployment configuration e2e tests' )
53+ . addFlag ( 'disableSecureAccounts' , 'Disable secure accounts on GRE' )
4754 . addOptionalParam ( 'graphConfig' , cliOpts . graphConfig . description )
4855 . addOptionalParam ( 'addressBook' , cliOpts . addressBook . description )
4956 . setAction ( async ( args , hre : HardhatRuntimeEnvironment ) => {
@@ -55,6 +62,7 @@ task('e2e:config', 'Run deployment configuration e2e tests')
5562 } )
5663
5764task ( 'e2e:init' , 'Run deployment initialization e2e tests' )
65+ . addFlag ( 'disableSecureAccounts' , 'Disable secure accounts on GRE' )
5866 . addOptionalParam ( 'graphConfig' , cliOpts . graphConfig . description )
5967 . addOptionalParam ( 'addressBook' , cliOpts . addressBook . description )
6068 . setAction ( async ( args , hre : HardhatRuntimeEnvironment ) => {
@@ -67,6 +75,7 @@ task('e2e:init', 'Run deployment initialization e2e tests')
6775
6876task ( 'e2e:scenario' , 'Run scenario scripts and e2e tests' )
6977 . addPositionalParam ( 'scenario' , 'Name of the scenario to run' )
78+ . addFlag ( 'disableSecureAccounts' , 'Disable secure accounts on GRE' )
7079 . addOptionalParam ( 'graphConfig' , cliOpts . graphConfig . description )
7180 . addOptionalParam ( 'addressBook' , cliOpts . addressBook . description )
7281 . addFlag ( 'skipScript' , "Don't run scenario script" )
@@ -85,6 +94,7 @@ task('e2e:scenario', 'Run scenario scripts and e2e tests')
8594 await runScriptWithHardhat ( hre . hardhatArguments , script , [
8695 args . graphConfig ,
8796 args . addressBook ,
97+ args . disableSecureAccounts ,
8898 ] )
8999 } else {
90100 console . log ( `No script found for scenario ${ args . scenario } ` )
0 commit comments