simulateHandleOp

Prepares a transaction to call the "simulateHandleOp" function on the contract.

Example

import { sendTransaction } from "thirdweb";
import { simulateHandleOp } from "thirdweb/extensions/erc4337";
const transaction = simulateHandleOp({
contract,
op: ...,
target: ...,
targetCallData: ...,
overrides: {
...
}
});
// Send the transaction
await sendTransaction({ transaction, account });
function simulateHandleOp(
| { asyncParams: () => Promise<SimulateHandleOpParams> }
>,

Parameters

The options for the "simulateHandleOp" function.

Type

| { asyncParams: () => Promise<SimulateHandleOpParams> }
>;

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.