MCPcopy Create free account
hub / github.com/api3dao/airnode / getExistingAirnodeRrpV0

Function getExistingAirnodeRrpV0

packages/airnode-examples/src/utils.ts:107–117  ·  view source on GitHub ↗
(networkName: string)

Source from the content-addressed store, hash-verified

105 * @returns The AirnodeRrpV0 contract address for the named network
106 */
107export const getExistingAirnodeRrpV0 = (networkName: string) => {
108 const networks = hardhatConfig.networks();
109
110 const networkId = networks[networkName].chainId.toString() as keyof typeof AirnodeRrpV0;
111
112 if (networkId) {
113 return AirnodeRrpV0[networkId];
114 } else {
115 throw new Error(`Missing AirnodeRrpV0 address for network: ${networkName}`);
116 }
117};

Callers 3

utils.test.tsFile · 0.90
getAirnodeRrpAddressFunction · 0.90
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected