Send and confirm calls in a single transaction.
This is a convenience function that sends the calls with sendCalls
and then waits for the receipts with waitForCallsReceipt
.
const call1 = approve({ contract: USDT_CONTRACT, amount: 100, spender: "0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709",});const call2 = transfer({ contract: USDT_CONTRACT, to: "0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709", amount: 100,});const result = await sendAndConfirmCalls({ calls: [call1, call2], wallet: wallet,});console.log("Transaction receipts:", result.receipts);
function sendAndConfirmCalls( options: { atomicRequired?: boolean; version?: string; } & { maxBlocksWaitTime?: number },): Promise<{ atomic: boolean; chainId: number; id: string; status: undefined | "pending" | "success" | "failure"; statusCode: number; version: string;}>;
The options for sending and confirming calls.
let options: { atomicRequired?: boolean; version?: string;} & { maxBlocksWaitTime?: number };