-
Notifications
You must be signed in to change notification settings - Fork 89
Expand file tree
/
Copy pathhardhat.config.ts
More file actions
87 lines (85 loc) · 2.54 KB
/
hardhat.config.ts
File metadata and controls
87 lines (85 loc) · 2.54 KB
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
import "./tasks"
import "@nomicfoundation/hardhat-chai-matchers"
import "@nomicfoundation/hardhat-ethers"
import "@nomicfoundation/hardhat-verify"
import "@typechain/hardhat"
import { config as dotenvConfig } from "dotenv"
import "hardhat-deploy"
import "hardhat-deploy-ethers"
import "hardhat-gas-reporter"
import { HardhatUserConfig } from "hardhat/config"
import "solidity-coverage"
import "@fil-b/filfox-verifier/hardhat"
dotenvConfig()
const deployerPrivateKey = process.env.PRIVATE_KEY!
const config: HardhatUserConfig = {
solidity: {
version: "0.8.23",
settings: {
optimizer: {
enabled: true,
// https://docs.soliditylang.org/en/latest/using-the-compiler.html#optimizer-options
runs: 1000,
},
viaIR: false,
},
},
defaultNetwork: "calibration",
namedAccounts: {
deployer: {
// By default, it will take the first Hardhat account as the deployer
default: 0,
},
},
networks: {
filecoin: {
url: "https://rpc.ankr.com/filecoin",
accounts: [deployerPrivateKey],
chainId: 314,
},
calibration: {
url: "https://rpc.ankr.com/filecoin_testnet",
accounts: [deployerPrivateKey],
chainId: 314159,
},
},
// configuration for harhdat-verify plugin with Blockscout API
etherscan: {
enabled: true,
apiKey: {
filecoin: "empty",
calibration: "empty",
},
customChains: [
{
network: "filecoin",
chainId: 314,
urls: {
apiURL: "https://filecoin.blockscout.com/api",
browserURL: "https://filecoin.blockscout.com",
},
},
{
network: "calibration",
chainId: 314159,
urls: {
apiURL: "https://filecoin-testnet.blockscout.com/api",
browserURL: "https://filecoin-testnet.blockscout.com",
},
},
],
},
verify: {
etherscan: {
apiKey: "empty",
},
},
sourcify: {
enabled: true, // verifies both on Sourcify and on Blockscout
// Optional: specify a different Sourcify server
apiUrl: "https://sourcify.dev/server",
// Optional: specify a different Sourcify repository
browserUrl: "https://repo.sourcify.dev",
},
}
export default config