-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhardhat.config.ts
96 lines (90 loc) · 2.19 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
import * as tdly from "@tenderly/hardhat-tenderly";
import { NetworksUserConfig } from "hardhat/types";
import './src/tasks';
import "dotenv/config";
import "hardhat-gas-reporter";
import "hardhat-contract-sizer";
import "hardhat-abi-exporter";
import "solidity-docgen";
import "@dirtycajunrice/hardhat-tasks/internal/type-extensions";
import "@dirtycajunrice/hardhat-tasks";
import "@nomicfoundation/hardhat-ethers";
import '@openzeppelin/hardhat-upgrades';
import "@nomicfoundation/hardhat-verify";
tdly.setup();
const networkData = [
{
name: "avalanche",
chainId: 43_114,
urls: {
rpc: `https://api.avax.network/ext/bc/C/rpc`,
api: "https://api.snowtrace.io/api",
browser: "https://snowtrace.io",
},
}
];
const config = {
defaultNetwork: "avalanche",
solidity: {
compilers: [ "8.20", "8.19", "8.18", "8.17", "8.16", "8.9", "8.2", "6.0" ].map(v => (
{
version: `0.${ v }`,
settings: {
...(
v === "8.20" ? { evmVersion: "london" } : {}
), optimizer: { enabled: true, runs: 200 }
},
}
)),
},
networks: networkData.reduce((o, network) => {
o[network.name] = {
url: network.urls.rpc,
chainId: network.chainId,
accounts: [ process.env.PRIVATE_KEY! ]
}
return o;
}, {} as NetworksUserConfig),
etherscan: {
apiKey: {
avalanche: process.env.SNOWTRACE_API_KEY,
},
customChains: networkData.map(network => (
{
network: network.name,
chainId: network.chainId,
urls: { apiURL: network.urls.api, browserURL: network.urls.browser },
}
))
},
docgen: {
pages: 'files'
},
tenderly: {
project: "cosmic-universe",
username: "DirtyCajunRIce",
privateVerification: false
},
contractSizer: {
alphaSort: true,
runOnCompile: true,
disambiguatePaths: false,
strict: true,
only: [ ':.*' ],
except: [],
},
abiExporter: {
path: "./abis",
runOnCompile: true,
clear: true,
flat: true,
only: ['src/contracts/'],
except: [ 'ChainlinkVRFConsumerUpgradeable' ],
spacing: 2,
pretty: true,
},
paths: {
sources: "./src/contracts",
}
}
export default config;