-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
71 lines (66 loc) · 1.76 KB
/
hardhat.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import { HardhatUserConfig } from 'hardhat/config';
import '@nomicfoundation/hardhat-toolbox';
import '@openzeppelin/hardhat-upgrades';
import '@matterlabs/hardhat-zksync-deploy';
import '@matterlabs/hardhat-zksync-upgradable';
import '@matterlabs/hardhat-zksync-solc';
import '@matterlabs/hardhat-zksync-verify';
import 'solidity-coverage';
import * as dotenv from 'dotenv';
import { NetworksUserConfig, NetworkUserConfig } from 'hardhat/src/types/config';
import './scripts/deploy_price_feed'
dotenv.config();
/**
* @type import('hardhat/config').HardhatUserConfig
*/
const config: HardhatUserConfig = {
typechain: {
outDir: 'typechain',
target: 'ethers-v6',
},
solidity: {
compilers: [
{
version: '0.8.23',
settings: {
viaIR: true,
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
defaultNetwork: process.env.DEFAULT_NETWORK || 'hardhat',
networks: {
hardhat: {
zksync: false,
},
zklinkSepolia: {
url: 'https://sepolia.rpc.zklink.io',
ethNetwork: 'sepolia',
verifyURL: 'https://sepolia.explorer.zklink.io/contract_verification',
zksync: true,
},
zklinkNova: {
url: 'https://rpc.zklink.io',
ethNetwork: 'mainnet',
verifyURL: 'https://explorer.zklink.io/contract_verification',
zksync: true,
},
},
zksolc: {
version: '1.3.22',
settings: {},
},
mocha: {
timeout: 600000,
},
};
if (!!config.defaultNetwork && config.defaultNetwork !== 'hardhat' && !!process.env.WALLET_PRIVATE_KEY) {
const ns = config.networks as NetworksUserConfig;
const nu = ns[config.defaultNetwork] as NetworkUserConfig;
nu.accounts = [process.env.WALLET_PRIVATE_KEY];
}
export default config;