MCPcopy Create free account
hub / github.com/subquery/subql / getNetworkFamily

Function getNetworkFamily

packages/cli/src/utils/networkFamily.ts:13–18  ·  view source on GitHub ↗
(network: string)

Source from the content-addressed store, hash-verified

11
12// can be either lowerCased or UpperCased
13export function getNetworkFamily(network: string): NETWORK_FAMILY {
14 if (!isNetwork(network)) {
15 throw new Error(`Network not found or unsupported network ${network}`);
16 }
17 return NETWORK_FAMILY[lowerCaseFirst(network) as unknown as keyof typeof NETWORK_FAMILY];
18}
19
20export function findRunnerByNetworkFamily(networkFamily: NETWORK_FAMILY): string {
21 for (const [key, value] of Object.entries(runnerMapping)) {

Callers 1

Calls 2

isNetworkFunction · 0.85
lowerCaseFirstFunction · 0.85

Tested by

no test coverage detected