-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhardhat.config.ts
78 lines (72 loc) · 1.5 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
73
74
75
76
77
78
import '@nomicfoundation/hardhat-toolbox'
import 'dotenv/config'
import 'hardhat-awesome-cli'
import { HardhatUserConfig } from 'hardhat/config'
import { NetworksUserConfig } from 'hardhat/types'
let networks: NetworksUserConfig = {}
const {
// Taurus
RPC_URL_TAURUS,
PRIVATE_KEY_TAURUS,
TAURUS_SCAN_API_KEY,
// Goerli
RPC_URL_GOERLI,
PRIVATE_KEY_GOERLI,
ETHERSCAN_API_KEY,
} = process.env
if (RPC_URL_TAURUS && PRIVATE_KEY_TAURUS) {
networks.taurus = {
url: RPC_URL_TAURUS,
chainId: 490000,
accounts: [PRIVATE_KEY_TAURUS],
}
}
if (RPC_URL_GOERLI && PRIVATE_KEY_GOERLI) {
networks.goerli = {
url: RPC_URL_GOERLI,
accounts: [PRIVATE_KEY_GOERLI],
}
}
const config: HardhatUserConfig = {
defaultNetwork: 'hardhat',
networks,
solidity: {
compilers: [
{
version: '0.8.19',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
etherscan: {
apiKey: {
taurus: `${TAURUS_SCAN_API_KEY}`,
goerli: `${ETHERSCAN_API_KEY}`,
},
customChains: [
{
network: 'taurus',
chainId: 490000,
urls: {
apiURL: 'https://blockscout.taurus.autonomys.xyz/api',
browserURL: 'https://blockscout.taurus.autonomys.xyz/',
},
},
],
},
paths: {
sources: './contracts',
tests: './test',
cache: './cache',
artifacts: './artifacts',
},
mocha: {
timeout: 240000,
},
}
export default config