-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
49 lines (44 loc) · 1.15 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
import '@nomicfoundation/hardhat-chai-matchers';
import '@nomiclabs/hardhat-ethers';
import '@nomiclabs/hardhat-etherscan';
import '@openzeppelin/hardhat-upgrades';
import { HardhatUserConfig } from 'hardhat/config';
import 'hardhat-gas-reporter';
import 'hardhat-contract-sizer';
import 'solidity-coverage';
import * as dotenv from 'dotenv'
dotenv.config();
const alchemyApiKey = process.env.ALCHEMY_API_KEY;
const privateKey = process.env.PRIVATE_KEY;
const networkConfig = (name: string) => ({
url: `https://${name}.g.alchemy.com/v2/${alchemyApiKey}`,
accounts: (privateKey ? [privateKey] : []),
});
const config: HardhatUserConfig = {
solidity: {
version: '0.8.17',
settings: {
optimizer: {
enabled: true,
runs: 1000,
},
},
},
contractSizer: {
runOnCompile: true,
},
gasReporter: {
currency: 'USD'
},
etherscan: {
apiKey: {
arbitrumGoerli: process.env.ARBISCAN_API_KEY as string,
arbitrumOne: process.env.ARBISCAN_API_KEY as string,
},
},
networks: {
'arbitrum': networkConfig('arbitrum'),
'arbitrum-goerli': networkConfig('arb-goerli'),
},
};
export default config;