-
Notifications
You must be signed in to change notification settings - Fork 57
/
hardhat.config.ts
72 lines (66 loc) · 1.82 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
import "@nomicfoundation/hardhat-chai-matchers"
import "@nomicfoundation/hardhat-toolbox"
import { config as dotenvConfig } from "dotenv"
import "hardhat-dependency-compiler"
import { HardhatUserConfig } from "hardhat/config"
import { NetworksUserConfig } from "hardhat/types"
import "solidity-coverage"
import "./tasks/deploy-bandada"
import "./tasks/verify-bandada"
import "./tasks/deploy-bandada-semaphore"
import "./tasks/verify-bandada-semaphore"
dotenvConfig()
function getNetworks(): NetworksUserConfig {
if (!process.env.BACKEND_PRIVATE_KEY) {
return {}
}
const infuraApiKey = process.env.INFURA_API_KEY
const accounts = [`0x${process.env.BACKEND_PRIVATE_KEY}`]
return {
local: {
url: "http://localhost:8545",
chainId: 1337,
accounts
},
sepolia: {
url: `https://sepolia.infura.io/v3/${infuraApiKey}`,
chainId: 11155111,
accounts
},
arbitrum: {
url: "https://arb1.arbitrum.io/rpc",
chainId: 42161,
accounts
}
}
}
const hardhatConfig: HardhatUserConfig = {
solidity: {
version: "0.8.4"
},
networks: {
hardhat: {
chainId: 1337,
allowUnlimitedContractSize: true
},
...getNetworks()
},
dependencyCompiler: {
paths: [
"@semaphore-protocol/contracts/base/Pairing.sol",
"@semaphore-protocol/contracts/base/SemaphoreVerifier.sol"
]
},
gasReporter: {
currency: "USD",
enabled: process.env.REPORT_GAS === "true",
coinmarketcap: process.env.COINMARKETCAP_API_KEY
},
typechain: {
target: "ethers-v5"
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY
}
}
export default hardhatConfig