File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,10 @@ const {
6
6
advanceTime,
7
7
advanceBlocks,
8
8
} = require ( "../test/helpers" ) ;
9
- const addresses = require ( "./addresses" ) ;
10
9
const {
11
10
deployWithConfirmation,
12
11
withConfirmation,
13
12
impersonateGuardian,
14
- handleTransitionGovernance,
15
13
buildGnosisSafeJson,
16
14
constructContractMethod,
17
15
} = require ( "./deploy" ) ;
@@ -36,13 +34,23 @@ function log(msg, deployResult = null) {
36
34
}
37
35
}
38
36
37
+ function getNetworkName ( ) {
38
+ if ( isForkTest ) {
39
+ return "hardhat" ;
40
+ } else if ( isFork ) {
41
+ return "localhost" ;
42
+ } else {
43
+ return process . env . NETWORK_NAME || "mainnet" ;
44
+ }
45
+ }
46
+
39
47
async function buildAndSimulateTimelockOperations (
40
48
deployName ,
41
49
propDesc ,
42
50
propArgs
43
51
) {
44
52
console . log ( "Building and simulating timelock operations for" , deployName ) ;
45
- const networkName = process . env . FORK_NETWORK_NAME ;
53
+ const networkName = getNetworkName ( ) ;
46
54
const { guardianAddr, timelockAddr } = await getNamedAccounts ( ) ;
47
55
48
56
const timelock = await ethers . getContractAt (
@@ -125,7 +133,7 @@ async function simulateTimelockOperations(deployName) {
125
133
return false ;
126
134
}
127
135
128
- const networkName = process . env . FORK_NETWORK_NAME ;
136
+ const networkName = getNetworkName ( ) ;
129
137
130
138
const scheduleFilePath = path . resolve (
131
139
__dirname ,
You can’t perform that action at this time.
0 commit comments