-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
64 lines (59 loc) · 1.76 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
import { TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS } from "hardhat/builtin-tasks/task-names";
import { HardhatUserConfig, subtask } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import { config as dotEnvConfig } from "dotenv";
import { privKey } from "./scripts/utils/encoding";
dotEnvConfig();
subtask(TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS).setAction(
async (_, __, runSuper) => {
const paths = await runSuper();
return paths.filter((p: any) => !p.endsWith(".t.sol"));
}
);
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.8.17",
settings: {
viaIR: true,
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
networks: {
sepolia: {
url: `https://eth-sepolia.g.alchemy.com/v2/${process.env.ALCHEMY_SEPOLIA_API_KEY}`,
accounts:
process.env.IS_ENV_SET?.toLowerCase() === "true"
? [
process.env.BRIDGE_OWNER_PRIV_KEY as string,
process.env.VALIDATOR_OWNER_PRIV_KEY as string,
process.env.ALICE_PRIV_KEY as string,
]
: [],
},
mumbai: {
url: `https://polygon-mumbai.g.alchemy.com/v2/${process.env.ALCHEMY_MUMBAI_API_KEY}`,
accounts:
process.env.IS_ENV_SET?.toLowerCase() === "true"
? [
process.env.BRIDGE_OWNER_PRIV_KEY as string,
process.env.VALIDATOR_OWNER_PRIV_KEY as string,
process.env.ALICE_PRIV_KEY as string,
]
: [],
},
},
etherscan: {
apiKey: {
sepolia: process.env.ETHEREUM_ETHERSCAN_API_KEY as string,
polygonMumbai: process.env.POLYGON_ETHERSCAN_API_KEY as string,
},
},
};
export default config;