@@ -19,8 +19,10 @@ import 'solidity-coverage';
19
19
const dotenvConfigPath : string = process . env . DOTENV_CONFIG_PATH || '../../.env' ;
20
20
dotenvConfig ( { path : resolve ( __dirname , dotenvConfigPath ) , override : true } ) ;
21
21
22
- const ETH_KEY = process . env . ETH_KEY ;
23
- const accounts = ETH_KEY ? ETH_KEY . split ( ',' ) : [ ] ;
22
+ // Fetch the accounts specified in the .env file
23
+ function specifiedAccounts ( ) : string [ ] {
24
+ return process . env . PRIVATE_KEY ? process . env . PRIVATE_KEY . split ( ',' ) : [ ] ;
25
+ }
24
26
25
27
// check alchemy Api key existence
26
28
@@ -56,7 +58,7 @@ task('compile').setAction(async (args, hre, runSuper) => {
56
58
task ( 'deploy-contracts' )
57
59
. addOptionalParam ( 'tags' , 'Specify which tags to deploy' )
58
60
. setAction ( async ( args , hre ) => {
59
- await hre . run ( 'build-contracts ' ) ;
61
+ await hre . run ( 'compile ' ) ;
60
62
await hre . run ( 'deploy' , {
61
63
tags : args . tags ,
62
64
} ) ;
@@ -102,7 +104,7 @@ const config: HardhatUserConfig = {
102
104
url : 'http://127.0.0.1:8011' ,
103
105
ethNetwork : 'http://127.0.0.1:8545' ,
104
106
zksync : true ,
105
- deploy : [ './deploy/new ' ] ,
107
+ deploy : [ './deploy' ] ,
106
108
gas : 15000000 ,
107
109
blockGasLimit : 30000000 ,
108
110
accounts : RichAccounts ,
@@ -114,7 +116,7 @@ const config: HardhatUserConfig = {
114
116
verifyURL :
115
117
'https://explorer.sepolia.era.zksync.dev/contract_verification' ,
116
118
deploy : [ './deploy' ] ,
117
- accounts : accounts ,
119
+ accounts : specifiedAccounts ( ) ,
118
120
forceDeploy : true ,
119
121
} ,
120
122
zksyncMainnet : {
@@ -124,7 +126,7 @@ const config: HardhatUserConfig = {
124
126
verifyURL :
125
127
'https://zksync2-mainnet-explorer.zksync.io/contract_verification' ,
126
128
deploy : [ './deploy' ] ,
127
- accounts : accounts ,
129
+ accounts : specifiedAccounts ( ) ,
128
130
forceDeploy : true ,
129
131
} ,
130
132
} ,
0 commit comments