-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathhardhat.config.test.ts
108 lines (102 loc) · 3.15 KB
/
hardhat.config.test.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import { task, HardhatUserConfig } from 'hardhat/config';
import * as dotenv from 'dotenv';
import 'tsconfig-paths/register';
import '@nomiclabs/hardhat-waffle';
import '@nomiclabs/hardhat-solhint';
import 'hardhat-gas-reporter';
import '@nomiclabs/hardhat-ethers';
import 'hardhat-deploy';
import '@atixlabs/hardhat-time-n-mine';
dotenv.config();
// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
task('accounts', 'Prints the list of accounts', async (args, hre) => {
const accounts = await hre.ethers.getSigners();
accounts.forEach((account, index) => {
console.log(`${index} Address: ${account.address}`);
});
});
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
/**
* @type import('hardhat/config').HardhatUserConfig
*/
const config: HardhatUserConfig = {
solidity: {
version: '0.8.4',
},
gasReporter: {
currency: 'USD',
coinmarketcap: '6932a382-08a0-41ef-86c7-2773dd0bd2f0',
gasPrice: 10,
// @ts-ignore
ethPrice: 600,
},
networks: {
'bsc-testnet': {
url: 'https://data-seed-prebsc-1-s2.binance.org:8545',
accounts: [process.env.BSC_TESTNET_DEPLOYER_PRIVATE_KEY as string],
live: true,
tags: ['staging'],
chainId: 97,
},
'bsc-devnet': {
url: 'https://data-seed-prebsc-1-s2.binance.org:8545',
accounts: [process.env.BSC_DEVNET_DEPLOYER_PRIVATE_KEY as string],
live: true,
tags: ['devnet'],
chainId: 97,
},
'bsc-mainnet': {
url: 'https://bsc-dataseed.binance.org/',
accounts: [process.env.BSC_MAINNET_DEPLOYER_PRIVATE_KEY as string],
live: true,
chainId: 56,
},
goerli: {
url: 'https://rpc.slock.it/goerli',
accounts: [process.env.BSC_TESTNET_DEPLOYER_PRIVATE_KEY as string],
chainId: 5,
},
rinkeby: {
url: 'https://rinkeby.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161',
accounts: [process.env.BSC_TESTNET_DEPLOYER_PRIVATE_KEY as string],
chainId: 4,
},
},
etherscan: {
// apiKey: process.env.BSCSCAN_API_KEY,
},
namedAccounts: {
deployer: {
default: 0,
},
feeCollector: {
default: 1,
'bsc-testnet': process.env.BSC_TESTNET_FEE_COLLECTOR_ADDRESS as string,
'bsc-devnet': process.env.BSC_DEVNET_FEE_COLLECTOR_ADDRESS as string,
'bsc-mainnet': process.env.BSC_MAINNET_FEE_COLLECTOR_ADDRESS as string,
},
defaultAdmin: {
default: 2,
'bsc-testnet': process.env.BSC_TESTNET_DEFAULT_ADMIN_ADDRESS as string,
'bsc-devnet': process.env.BSC_DEVNET_DEFAULT_ADMIN_ADDRESS as string,
'bsc-mainnet': process.env.BSC_MAINNET_DEFAULT_ADMIN_ADDRESS as string,
},
alice: 3,
bob: 4,
bridgeAdmin: {
default: 5,
'bsc-testnet': `privatekey://${
process.env.BSC_TESTNET_BRIDGE_ADMIN_PRIVATE_KEY as string
}`,
'bsc-devnet': `privatekey://${
process.env.BSC_DEVNET_BRIDGE_ADMIN_PRIVATE_KEY as string
}`,
'bsc-mainnet': `privatekey://${
process.env.BSC_MAINNET_BRIDGE_ADMIN_PRIVATE_KEY as string
}`,
},
},
};
export default config;