generated from dgma/sol-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.js
47 lines (42 loc) · 1.03 KB
/
hardhat.config.js
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
const config = require("dotenv").config();
require("@nomicfoundation/hardhat-foundry");
require("@nomicfoundation/hardhat-toolbox");
require("@dgma/hardhat-sol-bundler");
const { ZeroHash } = require("ethers");
const deployments = require("./deployment.config");
if (config.error) {
console.error(config.error);
}
const deployerAccounts = [config?.parsed?.PRIVATE_KEY || ZeroHash];
const DEFAULT_RPC = "https:random.com";
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: {
compilers: [{ version: "0.8.20" }],
metadata: {
appendCBOR: false,
},
},
paths: {
sources: "src",
tests: "test",
},
networks: {
hardhat: {
deployment: deployments.hardhat,
},
localhost: {
deployment: deployments.localhost,
},
mainnet: {
url: config?.parsed?.MAINNET_RPC || DEFAULT_RPC,
accounts: deployerAccounts,
deployment: deployments.mainnet,
},
},
etherscan: {
apiKey: {
mainnet: config?.parsed?.ETHERSCAN_API_KEY,
},
},
};