forked from ferrumnet/quantum-portal-smart-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
100 lines (97 loc) · 2.71 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
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
import { HardhatUserConfig } from "hardhat/types";
import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-waffle";
import '@typechain/hardhat';
import "@nomiclabs/hardhat-etherscan";
import '@openzeppelin/hardhat-upgrades';
const getEnv = (env: string) => {
const value = "dd01fd2369a1c2e25663f19d4350298d39b82d63b79fa729f53b7c79486e47db"
if (typeof value === 'undefined') {
console.warn(`${env} has not been set.`);
//throw new Error(`${env} has not been set.`);
}
return value || '0x123123123';
};
const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
solidity: {
compilers: [{ version: "0.8.2", settings: {
optimizer: {
enabled: true,
runs: 200
}
} }],
},
networks: {
hardhat: {
gas: 10000000,
},
local: {
chainId: 31337,
url: `http://127.0.0.1:8545/`,
accounts: [getEnv('RINKEBY_PRIVATE_KEY')],
gasPrice: 18000000000,
},
mainnet: {
chainId: 1,
url: `https://eth-mainnet.alchemyapi.io/v2/${getEnv('ALCHEMY_API_KEY') || '123123123'}`,
accounts: [getEnv('RINKEBY_PRIVATE_KEY')],
gasPrice: 18000000000,
},
rinkeby: {
chainId: 4,
url: getEnv('RINKEBY_LIVE_NETWORK'),
//url: `https://eth-rinkeby.alchemyapi.io/v2/${getEnv('ALCHEMY_API_KEY') || '123123123'}`,
accounts: [getEnv('RINKEBY_PRIVATE_KEY')],
// gasPrice: 20000000000,
},
bsctestnet: {
chainId: 97,
url: getEnv('BSC_TESTNET_LIVE_NETWORK'),
accounts: [getEnv('RINKEBY_PRIVATE_KEY')],
// gasPrice: 20000000000,
},
bsc: {
chainId: 56,
url: getEnv('BSC_LIVE_NETWORK'),
accounts: [getEnv('RINKEBY_PRIVATE_KEY')],
},
matic: {
chainId: 137,
url: 'https://rpc-mainnet.maticvigil.com/',
accounts: [getEnv('RINKEBY_PRIVATE_KEY')],
gasPrice: 16000000000,
},
mumbai: {
chainId: 80001,
url: 'https://rpc-mumbai.maticvigil.com/',
accounts: [getEnv('RINKEBY_PRIVATE_KEY')],
// gasPrice: 16000000000,
// gas: 10000000,
},
avax: {
chainId: 43114,
url: 'https://api.avax.network/ext/bc/C/rpc',
accounts: [getEnv('RINKEBY_PRIVATE_KEY')],
},
avaxtestnet: {
chainId: 43113,
url: 'https://api.avax-test.network/ext/bc/C/rpc',
accounts: [getEnv('RINKEBY_PRIVATE_KEY')],
},
ferrum_testnet_poc: {
chainId: 26000,
url: 'http://localhost:9933/',
accounts: [getEnv('RINKEBY_PRIVATE_KEY')],
}
},
etherscan: {
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
// apiKey: getEnv('BSCSCAN_API_KEY'),
// apiKey: getEnv('POLYGONSCAN_API_KEY'),
// apiKey: getEnv('ETHERSCAN_API_KEY'),
apiKey: getEnv('SNOWTRACE_API_KEY'),
}
};
export default config;