MCPcopy Create free account
hub / github.com/cardstack/cardstack / networkName

Function networkName

packages/cardpay-sdk/sdk/utils/general-utils.ts:8–15  ·  view source on GitHub ↗
(web3: Web3)

Source from the content-addressed store, hash-verified

6const POLL_INTERVAL = 500;
7
8export async function networkName(web3: Web3): Promise<string> {
9 let id = await web3.eth.net.getId();
10 let name = networks[id];
11 if (!name) {
12 throw new Error(`Don't know what name the network id ${id} is`);
13 }
14 return name;
15}
16
17export function waitUntilTransactionMined(
18 web3: Web3,

Callers 4

authenticateMethod · 0.90
getConstantFunction · 0.90
getAddressFunction · 0.90
getOracleFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected