userOperationRevertReasonEvent

Creates an event object for the UserOperationRevertReason event.

Example

import { getContractEvents } from "thirdweb";
import { userOperationRevertReasonEvent } from "thirdweb/extensions/erc4337";
const events = await getContractEvents({
contract,
events: [
userOperationRevertReasonEvent({
userOpHash: ...,
sender: ...,
})
],
});
function userOperationRevertReasonEvent(
filters: Partial<{ sender: string; userOpHash: `0x${string}` }>,
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "userOpHash";
readonly type: "bytes32";
},
{
readonly indexed: true;
readonly name: "sender";
readonly type: "address";
},
{ readonly name: "nonce"; readonly type: "uint256" },
{ readonly name: "revertReason"; readonly type: "bytes" },
];
readonly name: "UserOperationRevertReason";
readonly type: "event";
}>;

Parameters

Optional filters to apply to the event.

Type

let filters: Partial<{ sender: string; userOpHash: `0x${string}` }>;

Returns

let returnType: PreparedEvent<{
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "userOpHash";
readonly type: "bytes32";
},
{
readonly indexed: true;
readonly name: "sender";
readonly type: "address";
},
{ readonly name: "nonce"; readonly type: "uint256" },
{ readonly name: "revertReason"; readonly type: "bytes" },
];
readonly name: "UserOperationRevertReason";
readonly type: "event";
}>;

The prepared event object.