-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.ts
67 lines (63 loc) · 1.61 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
import "@nomiclabs/hardhat-ethers"
import "@nomiclabs/hardhat-waffle"
import "@nomiclabs/hardhat-web3"
import "@nomiclabs/hardhat-etherscan"
import "@typechain/hardhat"
import "hardhat-gas-reporter"
import "solidity-coverage"
import "hardhat-deploy"
import "hardhat-spdx-license-identifier"
import { HardhatUserConfig } from "hardhat/config"
import dotenv from "dotenv"
dotenv.config()
const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
networks: {
hardhat: {
hardfork: process.env.CODE_COVERAGE ? "berlin" : "london",
},
},
paths: {
artifacts: "./build/artifacts",
cache: "./build/cache",
},
solidity: {
compilers: [
{
version: "0.8.6",
settings: {
optimizer: {
enabled: true,
runs: 10000,
},
},
},
],
},
typechain: {
outDir: "./build/typechain/",
target: "ethers-v5",
},
gasReporter: {
currency: "USD",
gasPrice: 21,
},
mocha: {
timeout: 200000,
},
namedAccounts: {
deployer: {
default: 0, // here this will by default take the first account as deployer
1: 0, // similarly on mainnet it will take the first account as deployer. Note though that depending on how hardhat network are configured, the account 0 on one network can be different than on another
},
libraryDeployer: {
default: 1, // use a different account for deploying libraries on the hardhat network
1: 0, // use the same address as the main deployer on mainnet
},
},
spdxLicenseIdentifier: {
overwrite: false,
runOnCompile: true,
},
}
export default config