forked from BigWhaleLabs/seal-cred-verifier-contract
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
62 lines (58 loc) · 1.42 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
import '@nomiclabs/hardhat-etherscan'
import '@nomiclabs/hardhat-waffle'
import '@typechain/hardhat'
import 'hardhat-gas-reporter'
import 'solidity-coverage'
import * as dotenv from 'dotenv'
import { ETH_RPC as FALLBACK_ETH_RPC } from '@big-whale-labs/constants'
import { HardhatUserConfig } from 'hardhat/config'
import { cleanEnv, str, testOnly } from 'envalid'
dotenv.config()
const {
CONTRACT_OWNER_PRIVATE_KEY,
ETH_RPC,
ETHERSCAN_API_KEY,
COINMARKETCAP_API_KEY,
} = cleanEnv(process.env, {
CONTRACT_OWNER_PRIVATE_KEY: str({
devDefault: testOnly(
'0000000000000000000000000000000000000000000000000000000000000000'
),
}),
ETH_RPC: str({ default: FALLBACK_ETH_RPC }),
ETHERSCAN_API_KEY: str({ devDefault: testOnly('') }),
COINMARKETCAP_API_KEY: str({ devDefault: testOnly('') }),
})
const config: HardhatUserConfig = {
solidity: {
version: '0.8.17',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
networks: {
deploy: {
url: ETH_RPC,
accounts: [CONTRACT_OWNER_PRIVATE_KEY],
},
local: {
url: 'http://127.0.0.1:8545',
accounts: [], // accounts private keys generated by the local node
},
},
gasReporter: {
enabled: true,
currency: 'USD',
coinmarketcap: COINMARKETCAP_API_KEY,
},
etherscan: {
apiKey: ETHERSCAN_API_KEY,
},
typechain: {
outDir: 'typechain',
},
}
export default config