-
Notifications
You must be signed in to change notification settings - Fork 23
/
hardhat.config.ts
91 lines (85 loc) · 1.99 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
79
80
81
82
83
84
85
86
87
88
89
90
91
import { HardhatUserConfig } from "hardhat/types";
import "@shardlabs/starknet-hardhat-plugin";
import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-etherscan";
import chai from "chai";
import { solidity } from "ethereum-waffle";
import { config as dotenvConfig } from "dotenv";
import { resolve } from "path";
dotenvConfig({ path: resolve(__dirname, "./.env") });
chai.use(solidity);
const {
PRIVATE_KEY,
ALCHEMY_KEY,
HOSTNAME_L1,
HOSTNAME_L2,
ETHERSCAN_API_KEY,
L2_NETWORK,
} = process.env;
if (!PRIVATE_KEY || !ALCHEMY_KEY || !ETHERSCAN_API_KEY) {
throw new Error("Please set your private keys in your .env file");
}
/**
* @type import('hardhat/config').HardhatUserConfig
*/
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.8.10",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
evmVersion: "london",
},
},
// to compile LendingPool contract
{
version: "0.6.12",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
starknet: {
venv: ".venv",
network: L2_NETWORK,
wallets: {
OpenZeppelin: {
accountName: "OpenZeppelin",
modulePath:
"starkware.starknet.wallets.open_zeppelin.OpenZeppelinAccount",
accountPath: "~/.starknet_accounts",
},
},
},
etherscan: {
apiKey: {
mainnet: ETHERSCAN_API_KEY,
},
},
networks: {
l2_testnet: {
url: `http://${HOSTNAME_L2 || "localhost"}:5050`,
},
l1_testnet: {
url: `http://${HOSTNAME_L1 || "localhost"}:8545`,
},
mainnet: {
url: `https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_KEY}`,
accounts: [PRIVATE_KEY],
allowUnlimitedContractSize: true,
},
goerli: {
url: `https://eth-goerli.alchemyapi.io/v2/${ALCHEMY_KEY}`,
accounts: [PRIVATE_KEY],
},
},
};
export default config;