-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathhardhat.config.ts
72 lines (62 loc) · 1.57 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
import "@nomicfoundation/hardhat-foundry";
import 'hardhat-typechain'
import '@nomiclabs/hardhat-ethers'
import '@nomicfoundation/hardhat-chai-matchers'
import {
HardhatUserConfig,
NetworkUserConfig,
} from "hardhat/types";
import * as dotenv from 'dotenv';
dotenv.config();
const { TESTNET_URL, MAINNET_URL } = process.env;
const testnet: NetworkUserConfig = {
chainId: 2021,
url: TESTNET_URL || "https://saigon-testnet.roninchain.com/rpc",
};
const mainnet: NetworkUserConfig = {
chainId: 2020,
url: MAINNET_URL || "https://api.roninchain.com/rpc",
};
const PERMIT2X_SETTINGS = {
version: '0.8.17',
settings: {
viaIR: true,
optimizer: {
enabled: true,
runs: 1_000_000,
},
},
}
const GOVERNANCE_SETTINGS = {
version: '0.8.26',
settings: {
optimizer: {
enabled: true,
runs: 1_000_000,
},
},
}
const config: HardhatUserConfig = {
paths: {
sources: "./src",
},
networks: {
"ronin-testnet": testnet,
"ronin-mainnet": mainnet,
},
solidity: {
compilers: [PERMIT2X_SETTINGS],
overrides: {
"src/governance/KatanaGovernance.sol": GOVERNANCE_SETTINGS,
"@openzeppelin/contracts/utils/structs/EnumerableSet.sol": GOVERNANCE_SETTINGS,
"@openzeppelin/contracts/utils/Address.sol": GOVERNANCE_SETTINGS,
"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": GOVERNANCE_SETTINGS,
"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": GOVERNANCE_SETTINGS,
"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": GOVERNANCE_SETTINGS
},
},
mocha: {
timeout: 200000,
},
};
export default config;