generated from Phala-Network/phat-contract-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
53 lines (49 loc) · 1.74 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
import "dotenv/config";
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import { ProxyAgent, setGlobalDispatcher } from 'undici';
if (process.env.http_proxy || process.env.https_proxy) {
const proxy = (process.env.http_proxy || process.env.https_proxy)!;
const proxyAgent = new ProxyAgent(proxy);
setGlobalDispatcher(proxyAgent);
}
// If not set, it uses the hardhat account 0 private key.
const DEPLOYER_PRIVATE_KEY =
process.env.DEPLOYER_PRIVATE_KEY ?? "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80";
// Get a free POLYGONSCAN_API_KEY at https://polygonscan.com.
const POLYGONSCAN_API_KEY = process.env.POLYGONSCAN_API_KEY || '';
const config: HardhatUserConfig = {
solidity: "0.8.17",
networks: {
polygon: {
// If not set, you can get your own Alchemy API key at https://dashboard.alchemyapi.io or https://infura.io
url: process.env.POLYGON_RPC_URL ?? '',
accounts: [DEPLOYER_PRIVATE_KEY],
},
mumbai: {
// If not set, you can get your own Alchemy API key at https://dashboard.alchemyapi.io or https://infura.io
url: process.env.MUMBAI_RPC_URL ?? '',
accounts: [DEPLOYER_PRIVATE_KEY],
},
zkEvm: {
chainId: 1442,
// If not set, you can get your own Alchemy API key at https://dashboard.alchemyapi.io or https://infura.io
url: process.env.MUMBAI_RPC_URL ?? '',
accounts: [DEPLOYER_PRIVATE_KEY],
},
},
etherscan: {
apiKey: POLYGONSCAN_API_KEY,
customChains: [
{
network: "zkEvm",
chainId: 1442,
urls: {
apiURL:"https://rpc.public.zkevm-test.net",
browserURL: "https://testnet-zkevm.polygonscan.com"
}
}
]
},
};
export default config;