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

Function requestWithdrawal

packages/airnode-admin/src/implementation.ts:219–237  ·  view source on GitHub ↗
(
  airnodeRrp: AirnodeRrpV0,
  airnodeAddress: string,
  sponsorWalletAddress: string,
  overrides?: ethers.Overrides
)

Source from the content-addressed store, hash-verified

217}
218
219export async function requestWithdrawal(
220 airnodeRrp: AirnodeRrpV0,
221 airnodeAddress: string,
222 sponsorWalletAddress: string,
223 overrides?: ethers.Overrides
224) {
225 const tx = await airnodeRrp.requestWithdrawal(
226 airnodeAddress,
227 sponsorWalletAddress,
228 await parseOverrides(airnodeRrp.provider, overrides)
229 );
230
231 return new Promise<string>((resolve) =>
232 airnodeRrp.provider.once(tx.hash, ({ logs }) => {
233 const parsedLog = airnodeRrp.interface.parseLog(logs[0]);
234 resolve(parsedLog.args.withdrawalRequestId);
235 })
236 );
237}
238
239export async function checkWithdrawalRequest(airnodeRrp: AirnodeRrpV0, requestId: string) {
240 const filter = airnodeRrp.filters.FulfilledWithdrawal(null, null, requestId, null, null);

Callers 1

makeWithdrawalRequestFunction · 0.90

Calls 1

parseOverridesFunction · 0.85

Tested by

no test coverage detected