We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
config
getNetwork
1 parent 68e05c3 commit dddd2a0Copy full SHA for dddd2a0
src/config/config.json
src/utils/utils.js
@@ -1,28 +1,2 @@
1
-import { readFile } from "fs/promises";
2
-
3
-const config = JSON.parse(
4
- await readFile(new URL("../config/config.json", import.meta.url)),
5
-);
6
7
-export function getNetwork(network) {
8
- const networks = {
9
- local: {
10
- url: config.localhostParams.url,
11
- networkId: config.localhostParams.networkId,
12
- },
13
- testnet: {
14
- url: config.testNetParams.url,
15
- networkId: config.testNetParams.networkId,
16
17
- mainnet: {
18
- url: config.mainNetParams.url,
19
- networkId: config.mainNetParams.networkId,
20
21
- };
22
23
- return networks[network];
24
-}
25
26
export const print = console.log;
27
export const printError = console.error;
28
-export { config };
0 commit comments