EIP5792.useWaitForCallsReceipt

A hook to wait for the receipt of eip5792 calls.

Example

const { data: receipt, isLoading } = useWaitForCallsReceipt({
id,
client,
chain,
wallet,
});

Example with useSendCalls:

const { mutate: sendCalls, data } = useSendCalls();
const { data: receipt, isLoading } = useWaitForCallsReceipt(data);
function useWaitForCallsReceipt(
args:
| undefined
| ({
chain: Readonly;
client: ThirdwebClient;
id: string;
wallet: Wallet;
} & {
maxBlocksWaitTime?: number;
queryOptions?: { enabled?: boolean };
}),
): UseQueryResult<
{
atomic: boolean;
chainId: number;
id: string;
receipts?: Array<
WalletCallReceipt<bigint, "success" | "reverted">
>;
status: undefined | "pending" | "success" | "failure";
statusCode: number;
version: string;
},
Error
>;

Parameters

Type

let args:
| undefined
| ({
chain: Readonly;
client: ThirdwebClient;
id: string;
wallet: Wallet;
} & {
maxBlocksWaitTime?: number;
queryOptions?: { enabled?: boolean };
});

Returns

let returnType: UseQueryResult<
{
atomic: boolean;
chainId: number;
id: string;
receipts?: Array<
WalletCallReceipt<bigint, "success" | "reverted">
>;
status: undefined | "pending" | "success" | "failure";
statusCode: number;
version: string;
},
Error
>;

A useQuery object.