Docs

useSimulateTransaction

A hook to simulate a transaction.

Example

import { useSimulateTransaction } from "thirdweb/react";
const { mutate: simulateTx } = useSimulateTransaction();
// later
const result = await simulateTx(tx);

Returns

A mutation object to simulate a transaction.