()
| 30 | }; |
| 31 | |
| 32 | const makeRequest = async (): Promise<string> => { |
| 33 | const integrationInfo = readIntegrationInfo(); |
| 34 | const airnodeRrp = await getDeployedContract('@api3/airnode-protocol/contracts/rrp/AirnodeRrpV0.sol'); |
| 35 | |
| 36 | // Import the "makeRequest" which triggers the Airnode request. |
| 37 | // See the "request-utils.ts" of the specific integration for details. |
| 38 | const { makeRequest } = await import(`../../integrations/${integrationInfo.integration}/request-utils.ts`); |
| 39 | const receipt = await makeRequest(); |
| 40 | |
| 41 | // Wait until the transaction is mined |
| 42 | return new Promise((resolve) => |
| 43 | getProvider().once(receipt.hash, (tx) => { |
| 44 | const parsedLog = airnodeRrp.interface.parseLog(tx.logs[0]); |
| 45 | resolve(parsedLog.args.requestId); |
| 46 | }) |
| 47 | ); |
| 48 | }; |
| 49 | |
| 50 | const main = async () => { |
| 51 | cliPrint.info('Making request...'); |
no test coverage detected