-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathhardhat.config.ts
More file actions
38 lines (31 loc) · 1.08 KB
/
hardhat.config.ts
File metadata and controls
38 lines (31 loc) · 1.08 KB
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
import { HardhatUserConfig } from "accelerated-hardhat/config";
import { config as dotenvConfig } from "dotenv";
import { resolve } from "path";
dotenvConfig({ path: resolve(__dirname, "./.env") });
// Ensure that we have all the environment variables we need.
const networkChainId: string | undefined = process.env.NETWORK_CHAIN_ID;
if (!networkChainId) {
throw new Error("Please set your NETWORK_CHAIN_ID in a .env file");
}
const networkJsonRpcUrl: string | undefined = process.env.NETWORK_JSON_RPC_URL;
if (!networkJsonRpcUrl) {
throw new Error("Please set your NETWORK_JSON_RPC_URL in a .env file");
}
const config: HardhatUserConfig = {
networks: {
hardhat: {
accounts: [
// this is a publicly known private key, do not use for anything else than testing
{ privateKey: "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff81", balance: "100000000000000000000" }
],
mining: {
auto: true,
},
chainId: +networkChainId,
forking: {
url: networkJsonRpcUrl,
},
},
},
};
export default config;