-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathhardhat.config.ts
81 lines (74 loc) · 1.92 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
72
73
74
75
76
77
78
79
80
81
import "@nomiclabs/hardhat-waffle";
import "hardhat-deploy";
import "hardhat-deploy-ethers";
import "@typechain/hardhat";
import "@nomiclabs/hardhat-etherscan";
import "@eth-optimism/plugins/hardhat/compiler";
import { HardhatUserConfig } from "hardhat/types";
import "./src.ts/tasks";
const urlOverride = process.env.ETH_PROVIDER_URL;
const chainId = parseInt(process.env.CHAIN_ID ?? "1337", 10);
const mnemonic =
process.env.SUGAR_DADDY ||
process.env.MNEMONIC ||
"candy maple cake sugar pudding cream honey rich smooth crumble sweet treat";
const config: HardhatUserConfig = {
paths: {
artifacts: "./artifacts",
deploy: "./deploy",
deployments: "./deployments",
sources: "./src.sol",
tests: "./src.ts",
},
solidity: {
// version: packageJson.devDependencies.solc,
version: "0.7.3",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
defaultNetwork: "hardhat",
namedAccounts: {
deployer: { default: 0 },
alice: { default: 1 },
bob: { default: 2 },
rando: { default: 3 },
},
etherscan: {
apiKey: process.env.API_KEY || "",
},
networks: {
hardhat: {
accounts: {
accountsBalance:
"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
mnemonic,
},
chainId,
loggingEnabled: false,
saveDeployments: false,
},
localhost: {
accounts: {
accountsBalance:
"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
mnemonic,
},
chainId,
loggingEnabled: false,
saveDeployments: false,
url: urlOverride || "http://localhost:8545",
},
optimismkovan1: {
url: "https://kovan.optimism.io",
accounts: {
mnemonic,
},
ovm: true, // this set the network as using the ovm and ensure contract will be compiled against that.
},
},
};
export default config;