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

Function main

packages/airnode-examples/src/scripts/make-request.ts:50–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48};
49
50const main = async () => {
51 cliPrint.info('Making request...');
52 const requestId = await makeRequest();
53 cliPrint.info('Waiting for fulfillment...');
54 await setMaxPromiseTimeout(waitForFulfillment(requestId), 180 * 1000);
55 cliPrint.info('Request fulfilled');
56
57 const integrationInfo = readIntegrationInfo();
58 // Import the function to print the response from the chosen integration. See the respective "request-utils.ts" for
59 // details.
60 const { printResponse } = await import(`../../integrations/${integrationInfo.integration}/request-utils.ts`);
61 await printResponse(requestId);
62};
63
64runAndHandleErrors(main);

Callers

nothing calls this directly

Calls 6

setMaxPromiseTimeoutFunction · 0.85
readIntegrationInfoFunction · 0.85
infoMethod · 0.80
makeRequestFunction · 0.70
waitForFulfillmentFunction · 0.70
printResponseFunction · 0.50

Tested by

no test coverage detected