Docs

useSendAndConfirmTransaction

A hook to send a transaction.

Example

import { useSendAndConfirmTransaction } from "thirdweb/react";
const { mutate: sendAndConfirmTx, data: transactionReceipt } =
useSendAndConfirmTransaction();
// later
sendAndConfirmTx(tx);

Returns

A mutation object to send a transaction.