-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.js
61 lines (54 loc) · 1.4 KB
/
hardhat.config.js
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
require('dotenv').config();
require('@nomicfoundation/hardhat-toolbox');
// Register tasks
require('./tasks');
function getMnemonic(networkName) {
if (networkName) {
const mnemonic = process.env['MNEMONIC_' + networkName.toUpperCase()];
if (mnemonic && mnemonic !== '') {
return mnemonic;
}
}
const mnemonic = process.env.MNEMONIC;
if (!mnemonic || mnemonic === '') {
return 'test test test test test test test test test test test junk';
}
return mnemonic;
}
function getAccounts(chainKey) {
return { mnemonic: getMnemonic(chainKey) };
}
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: '0.8.11',
networks: {
hardhat: {
blockGasLimit: 100000000000,
},
localastra: {
url: 'http://localhost:8545',
chainId: 11110,
accounts: getAccounts(),
},
'astra-testnet': {
url: 'https://rpc.astranaut.dev',
chainId: 11115,
accounts: getAccounts(),
},
rinkeby: {
url: 'https://rinkeby.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161', // public infura endpoint
chainId: 4,
accounts: getAccounts(),
},
'bsc-testnet': {
url: 'https://data-seed-prebsc-1-s1.binance.org:8545/',
chainId: 97,
accounts: getAccounts(),
},
fuji: {
url: `https://api.avax-test.network/ext/bc/C/rpc`,
chainId: 43113,
accounts: getAccounts(),
},
},
};