-
Notifications
You must be signed in to change notification settings - Fork 112
/
Copy pathhardhat.config.ts
109 lines (107 loc) · 2.69 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import { config as dotEnvConfig } from "dotenv";
dotEnvConfig();
import "@openzeppelin/hardhat-upgrades";
import "@nomiclabs/hardhat-waffle";
import "@typechain/hardhat";
import "@nomiclabs/hardhat-ethers";
import "hardhat-deploy";
import "solidity-coverage";
import "@nomicfoundation/hardhat-verify";
module.exports = {
defaultNetwork: "hardhat",
networks: {
hardhat: {
chainId: 31337,
gas: 12000000,
blockGasLimit: 0x1fffffffffffff,
allowUnlimitedContractSize: true,
timeout: 1800000,
hardfork: "berlin", // use berlin in test to avoid issues with gas price 0
accounts: {
mnemonic: "test test test test test test test test test test test junk",
accountsBalance: "100000000000000000000000000000000000",
},
},
anvil: {
url: "http://localhost:8545",
accounts: {
mnemonic: "test test test test test test test test test test test junk",
},
},
testnet: {
url: process.env.BSC_TESTNET_RPC,
accounts: [process.env.BSC_TESTNET_PRIVATE_KEY],
},
mainnet: {
url: process.env.BSC_MAINNET_RPC,
accounts: [process.env.BSC_MAINNET_PRIVATE_KEY],
},
ethereum: {
url: process.env.ETH_MAINNET_RPC,
accounts: [process.env.ETH_MAINNET_PRIVATE_KEY],
},
fantom_testnet: {
url: "https://rpc.testnet.fantom.network/",
accounts: [process.env.FANTOM_TESTNET_PRIVATE_KEY],
},
fantom_mainnet: {
url: process.env.FTM_MAINNET_RPC,
accounts: [process.env.FANTOM_MAINNET_PRIVATE_KEY],
},
fantom_mainnetfork: {
url: process.env.FORK_RPC,
accounts: [process.env.FANTOM_MAINNET_PRIVATE_KEY],
},
mainnetfork: {
url: process.env.FORK_RPC,
accounts: [process.env.BSC_MAINNET_PRIVATE_KEY, process.env.QA_PRIVATE_KEY],
},
},
namedAccounts: {
deployer: {
default: 0,
},
},
solidity: {
version: "0.6.6",
settings: {
optimizer: {
enabled: true,
runs: 1,
},
evmVersion: "istanbul",
outputSelection: {
"*": {
"": ["ast"],
"*": [
"evm.bytecode.object",
"evm.deployedBytecode.object",
"abi",
"evm.bytecode.sourceMap",
"evm.deployedBytecode.sourceMap",
"metadata",
],
},
},
},
},
paths: {
sources: "./solidity/contracts/6",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
},
typechain: {
outDir: "./typechain",
target: process.env.TYPECHAIN_TARGET || "ethers-v5",
},
mocha: {
timeout: 100000,
},
etherscan: {
apiKey: process.env.BSCSCAN_API_KEY,
},
sourcify: {
enabled: false,
},
};