Skip to content

Commit ce4f1ca

Browse files
authored
ci: update zksync configs (#57)
1 parent 2c710cb commit ce4f1ca

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

packages/contracts/hardhat-zksync.config.ts

+8-6
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ import 'solidity-coverage';
1919
const dotenvConfigPath: string = process.env.DOTENV_CONFIG_PATH || '../../.env';
2020
dotenvConfig({path: resolve(__dirname, dotenvConfigPath), override: true});
2121

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+
}
2426

2527
// check alchemy Api key existence
2628

@@ -56,7 +58,7 @@ task('compile').setAction(async (args, hre, runSuper) => {
5658
task('deploy-contracts')
5759
.addOptionalParam('tags', 'Specify which tags to deploy')
5860
.setAction(async (args, hre) => {
59-
await hre.run('build-contracts');
61+
await hre.run('compile');
6062
await hre.run('deploy', {
6163
tags: args.tags,
6264
});
@@ -102,7 +104,7 @@ const config: HardhatUserConfig = {
102104
url: 'http://127.0.0.1:8011',
103105
ethNetwork: 'http://127.0.0.1:8545',
104106
zksync: true,
105-
deploy: ['./deploy/new'],
107+
deploy: ['./deploy'],
106108
gas: 15000000,
107109
blockGasLimit: 30000000,
108110
accounts: RichAccounts,
@@ -114,7 +116,7 @@ const config: HardhatUserConfig = {
114116
verifyURL:
115117
'https://explorer.sepolia.era.zksync.dev/contract_verification',
116118
deploy: ['./deploy'],
117-
accounts: accounts,
119+
accounts: specifiedAccounts(),
118120
forceDeploy: true,
119121
},
120122
zksyncMainnet: {
@@ -124,7 +126,7 @@ const config: HardhatUserConfig = {
124126
verifyURL:
125127
'https://zksync2-mainnet-explorer.zksync.io/contract_verification',
126128
deploy: ['./deploy'],
127-
accounts: accounts,
129+
accounts: specifiedAccounts(),
128130
forceDeploy: true,
129131
},
130132
},

0 commit comments

Comments
 (0)