-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhardhat.config.ts
66 lines (60 loc) · 1.55 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
import fs from "fs";
import { ethers } from "ethers";
import { HardhatUserConfig } from "hardhat/config";
import "@openzeppelin/hardhat-upgrades";
import "@nomicfoundation/hardhat-ethers";
import "@nomicfoundation/hardhat-toolbox";
const getMnemonic = () => {
try {
return fs.readFileSync(".mnemonic").toString().trim();
} catch {
// this is a dummy mnemonic, never use it for anything.
return "arrive furnace echo arch airport scrap glow gold brief food torch senior winner myself mutual";
}
};
const mnemonic: string = process.env.MNEMONIC ? process.env.MNEMONIC : ethers.Mnemonic.entropyToPhrase(ethers.randomBytes(32));
const chainIds = {
hardhat: 31337,
alpha4: 777018,
};
const config: HardhatUserConfig = {
solidity: "0.8.25",
networks: {
hardhat: {
accounts: {
count: 100,
mnemonic,
accountsBalance: "1000000000000000000000000000"
},
chainId: chainIds.hardhat,
allowUnlimitedContractSize: true,
hardfork: "istanbul",
minGasPrice: 0
},
alpha4: {
url: "http://62.171.133.46:54100",
accounts: {
mnemonic: getMnemonic(),
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
passphrase: "",
},
gasPrice: 1000000000,
},
},
etherscan: {
apiKey: "123",
customChains: [
{
network: "alpha4",
chainId: 777018,
urls: {
apiURL: "http://62.171.133.46:4400/api",
browserURL: "http://62.171.133.46:4400",
},
},
],
},
};
export default config;