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

Function readConfig

packages/airnode-node/src/config/index.ts:21–26  ·  view source on GitHub ↗
(configPath: string)

Source from the content-addressed store, hash-verified

19}
20
21const readConfig = (configPath: string): unknown => {
22 const goParse = goSync(() => JSON.parse(fs.readFileSync(configPath, 'utf8')));
23 if (!goParse.success) throw new Error('Failed to parse config file');
24
25 return goParse.data;
26};
27
28export function addDefaultContractAddresses(config: configTypes.Config): configTypes.Config {
29 const ctx = { addIssue: () => {}, path: [] }; // Unused, but required by validator functions

Callers 2

loadConfigFunction · 0.70
loadTrustedConfigFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected