EIP5792.waitForCallsReceipt

Waits for the EIP-5792 bundle to be confirmed.

This function is dependent on the wallet's support for EIP-5792 and could fail.

Example

import { waitForCallsReceipt } from "thirdweb/wallets/eip5792";
const result = await waitForCallsReceipt({
client,
chain,
wallet,
id: "0x123...",
});

Example with useSendCalls:

const sendResult = await sendCalls({
client,
chain,
wallet,
calls: [...],
});
const confirmResult = await waitForCallsReceipt(sendResult);
console.log("Transaction confirmed: ", confirmResult.receipts?.[0].transactionHash);
function waitForCallsReceipt(options: {
chain: Readonly;
client: ThirdwebClient;
id: string;
maxBlocksWaitTime?: number;
wallet: Wallet;
}): Promise<{
atomic: boolean;
chainId: number;
id: string;
receipts?: Array<WalletCallReceipt<bigint, "success" | "reverted">>;
status: undefined | "pending" | "success" | "failure";
statusCode: number;
version: string;
}>;

Parameters

The options for waiting for the bundle. By default, the max wait time is 100 blocks.

Type

let options: {
chain: Readonly;
client: ThirdwebClient;
id: string;
maxBlocksWaitTime?: number;
wallet: Wallet;
};

Returns

let returnType: {
blockHash: Hex;
blockNumber: quantity;
gasUsed: quantity;
logs: Array<{ address: string; data: Hex; topics: Array<Hex> }>;
transactionHash: Hex;
};

A promise that resolves with the final getCallsStatus result.