forked from stader-labs/ethx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
47 lines (45 loc) · 1.2 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
import 'dotenv/config'
import { ethers } from 'ethers'
import { HardhatUserConfig, task } from 'hardhat/config'
import '@typechain/hardhat'
import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-etherscan'
import '@openzeppelin/hardhat-upgrades'
import 'hardhat-gas-reporter'
import 'solidity-coverage'
import '@nomiclabs/hardhat-solhint'
import '@nomicfoundation/hardhat-foundry'
const config: HardhatUserConfig = {
// Your type-safe config goes here
solidity: {
compilers: [
{
version: '0.8.16',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
defaultNetwork: 'mainnet',
networks: {
hardhat: {},
goerli: {
url: process.env.PROVIDER_URL_TESTNET ?? '',
accounts: [process.env.OWNER_PRIVATE_KEY_TESTNET ?? ethers.Wallet.createRandom().privateKey],
},
mainnet: {
url: process.env.PROVIDER_URL_MAINNET ?? '',
accounts: [process.env.OWNER_PRIVATE_KEY_MAINNET ?? ethers.Wallet.createRandom().privateKey],
},
},
etherscan: {
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
apiKey: process.env.API_KEY,
},
}
export default config