forked from Ithil-protocol/v2-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
50 lines (44 loc) · 1.16 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
import '@nomicfoundation/hardhat-foundry'
import '@nomicfoundation/hardhat-toolbox'
import { config as dotenvConfig } from 'dotenv'
import { statSync } from 'fs'
import { type HardhatUserConfig, type NetworkUserConfig } from 'hardhat/types'
import { accountsPrivates } from './scripts/address-list'
dotenvConfig({ path: '.env.hardhat' })
if (!statSync('.env.hardhat').isFile()) {
console.warn('No .env.hardhat file found, required to use tenderly')
console.warn('Please check .env.hardhat.example for an example')
}
const { TENDERLY_URL } = process.env
const tenderlyNetwork = {} as any
if (TENDERLY_URL != null && TENDERLY_URL.length > 10) {
tenderlyNetwork.tenderly = {
url: TENDERLY_URL,
accounts: accountsPrivates,
} as NetworkUserConfig
}
const config: HardhatUserConfig = {
solidity: {
version: '0.8.18',
settings: {
optimizer: {
enabled: true,
runs: 1000,
},
},
},
networks: {
hardhat: {
chainId: 1337,
forking: {
url: 'https://arb1.arbitrum.io/rpc',
},
},
tenderly: {
url: TENDERLY_URL,
accounts: ['0x'],
},
...tenderlyNetwork,
},
}
export default config