-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
hardhat.config.ts
56 lines (53 loc) · 1.44 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
import 'solidity-coverage'
import '@typechain/hardhat'
import * as dotenv from 'dotenv'
import '@nomiclabs/hardhat-waffle'
import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-etherscan'
import { HardhatUserConfig } from 'hardhat/config'
dotenv.config({ path: '.env.local' })
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: '0.8.4',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
networks: {
hardhat: {},
mainnet: {
url: `https://mainnet.infura.io/v3/${process.env.NEXT_PUBLIC_INFURA_ID}`,
accounts: process.env.DEPLOYER_PRIVKEY !== undefined ? [process.env.DEPLOYER_PRIVKEY] : [],
},
kovan: {
url: `https://kovan.infura.io/v3/${process.env.NEXT_PUBLIC_INFURA_ID}`,
accounts: process.env.DEPLOYER_PRIVKEY !== undefined ? [process.env.DEPLOYER_PRIVKEY] : [],
},
polygon: {
url: `https://polygon-mainnet.infura.io/v3/${process.env.NEXT_PUBLIC_INFURA_ID}`,
accounts: process.env.DEPLOYER_PRIVKEY !== undefined ? [process.env.DEPLOYER_PRIVKEY] : [],
},
mumbai: {
url: `https://polygon-mumbai.infura.io/v3/${process.env.NEXT_PUBLIC_INFURA_ID}`,
accounts: process.env.DEPLOYER_PRIVKEY !== undefined ? [process.env.DEPLOYER_PRIVKEY] : [],
},
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
paths: {
sources: './src/contracts',
tests: './src/tests',
},
typechain: {
outDir: 'src/contracts',
},
}
export default config