import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers"; import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener, TypedContractMethod } from "../common"; export type PackedUserOperationStruct = { sender: AddressLike; nonce: BigNumberish; initCode: BytesLike; callData: BytesLike; accountGasLimits: BytesLike; preVerificationGas: BigNumberish; gasFees: BytesLike; paymasterAndData: BytesLike; signature: BytesLike; }; export type PackedUserOperationStructOutput = [ sender: string, nonce: bigint, initCode: string, callData: string, accountGasLimits: string, preVerificationGas: bigint, gasFees: string, paymasterAndData: string, signature: string ] & { sender: string; nonce: bigint; initCode: string; callData: string; accountGasLimits: string; preVerificationGas: bigint; gasFees: string; paymasterAndData: string; signature: string; }; export interface Safe4337ModuleInterface extends Interface { getFunction(nameOrSignature: "SUPPORTED_ENTRYPOINT" | "domainSeparator" | "encodeMessageDataForSafe" | "executeUserOp" | "executeUserOpWithErrorString" | "getMessageHash" | "getMessageHashForSafe" | "getModules" | "getOperationHash" | "isValidSignature(bytes32,bytes)" | "isValidSignature(bytes,bytes)" | "onERC1155BatchReceived" | "onERC1155Received" | "onERC721Received" | "simulate" | "supportsInterface" | "tokensReceived" | "validateUserOp"): FunctionFragment; encodeFunctionData(functionFragment: "SUPPORTED_ENTRYPOINT", values?: undefined): string; encodeFunctionData(functionFragment: "domainSeparator", values?: undefined): string; encodeFunctionData(functionFragment: "encodeMessageDataForSafe", values: [AddressLike, BytesLike]): string; encodeFunctionData(functionFragment: "executeUserOp", values: [AddressLike, BigNumberish, BytesLike, BigNumberish]): string; encodeFunctionData(functionFragment: "executeUserOpWithErrorString", values: [AddressLike, BigNumberish, BytesLike, BigNumberish]): string; encodeFunctionData(functionFragment: "getMessageHash", values: [BytesLike]): string; encodeFunctionData(functionFragment: "getMessageHashForSafe", values: [AddressLike, BytesLike]): string; encodeFunctionData(functionFragment: "getModules", values?: undefined): string; encodeFunctionData(functionFragment: "getOperationHash", values: [PackedUserOperationStruct]): string; encodeFunctionData(functionFragment: "isValidSignature(bytes32,bytes)", values: [BytesLike, BytesLike]): string; encodeFunctionData(functionFragment: "isValidSignature(bytes,bytes)", values: [BytesLike, BytesLike]): string; encodeFunctionData(functionFragment: "onERC1155BatchReceived", values: [ AddressLike, AddressLike, BigNumberish[], BigNumberish[], BytesLike ]): string; encodeFunctionData(functionFragment: "onERC1155Received", values: [AddressLike, AddressLike, BigNumberish, BigNumberish, BytesLike]): string; encodeFunctionData(functionFragment: "onERC721Received", values: [AddressLike, AddressLike, BigNumberish, BytesLike]): string; encodeFunctionData(functionFragment: "simulate", values: [AddressLike, BytesLike]): string; encodeFunctionData(functionFragment: "supportsInterface", values: [BytesLike]): string; encodeFunctionData(functionFragment: "tokensReceived", values: [ AddressLike, AddressLike, AddressLike, BigNumberish, BytesLike, BytesLike ]): string; encodeFunctionData(functionFragment: "validateUserOp", values: [PackedUserOperationStruct, BytesLike, BigNumberish]): string; decodeFunctionResult(functionFragment: "SUPPORTED_ENTRYPOINT", data: BytesLike): Result; decodeFunctionResult(functionFragment: "domainSeparator", data: BytesLike): Result; decodeFunctionResult(functionFragment: "encodeMessageDataForSafe", data: BytesLike): Result; decodeFunctionResult(functionFragment: "executeUserOp", data: BytesLike): Result; decodeFunctionResult(functionFragment: "executeUserOpWithErrorString", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getMessageHash", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getMessageHashForSafe", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getModules", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getOperationHash", data: BytesLike): Result; decodeFunctionResult(functionFragment: "isValidSignature(bytes32,bytes)", data: BytesLike): Result; decodeFunctionResult(functionFragment: "isValidSignature(bytes,bytes)", data: BytesLike): Result; decodeFunctionResult(functionFragment: "onERC1155BatchReceived", data: BytesLike): Result; decodeFunctionResult(functionFragment: "onERC1155Received", data: BytesLike): Result; decodeFunctionResult(functionFragment: "onERC721Received", data: BytesLike): Result; decodeFunctionResult(functionFragment: "simulate", data: BytesLike): Result; decodeFunctionResult(functionFragment: "supportsInterface", data: BytesLike): Result; decodeFunctionResult(functionFragment: "tokensReceived", data: BytesLike): Result; decodeFunctionResult(functionFragment: "validateUserOp", data: BytesLike): Result; } export interface Safe4337Module extends BaseContract { connect(runner?: ContractRunner | null): Safe4337Module; waitForDeployment(): Promise; interface: Safe4337ModuleInterface; queryFilter(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>>; queryFilter(filter: TypedDeferredTopicFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>>; on(event: TCEvent, listener: TypedListener): Promise; on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise; once(event: TCEvent, listener: TypedListener): Promise; once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise; listeners(event: TCEvent): Promise>>; listeners(eventName?: string): Promise>; removeAllListeners(event?: TCEvent): Promise; SUPPORTED_ENTRYPOINT: TypedContractMethod<[], [string], "view">; domainSeparator: TypedContractMethod<[], [string], "view">; encodeMessageDataForSafe: TypedContractMethod<[ safe: AddressLike, message: BytesLike ], [ string ], "view">; executeUserOp: TypedContractMethod<[ to: AddressLike, value: BigNumberish, data: BytesLike, operation: BigNumberish ], [ void ], "nonpayable">; executeUserOpWithErrorString: TypedContractMethod<[ to: AddressLike, value: BigNumberish, data: BytesLike, operation: BigNumberish ], [ void ], "nonpayable">; getMessageHash: TypedContractMethod<[message: BytesLike], [string], "view">; getMessageHashForSafe: TypedContractMethod<[ safe: AddressLike, message: BytesLike ], [ string ], "view">; getModules: TypedContractMethod<[], [string[]], "view">; getOperationHash: TypedContractMethod<[ userOp: PackedUserOperationStruct ], [ string ], "view">; "isValidSignature(bytes32,bytes)": TypedContractMethod<[ _dataHash: BytesLike, _signature: BytesLike ], [ string ], "view">; "isValidSignature(bytes,bytes)": TypedContractMethod<[ _data: BytesLike, _signature: BytesLike ], [ string ], "view">; onERC1155BatchReceived: TypedContractMethod<[ arg0: AddressLike, arg1: AddressLike, arg2: BigNumberish[], arg3: BigNumberish[], arg4: BytesLike ], [ string ], "view">; onERC1155Received: TypedContractMethod<[ arg0: AddressLike, arg1: AddressLike, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike ], [ string ], "view">; onERC721Received: TypedContractMethod<[ arg0: AddressLike, arg1: AddressLike, arg2: BigNumberish, arg3: BytesLike ], [ string ], "view">; simulate: TypedContractMethod<[ targetContract: AddressLike, calldataPayload: BytesLike ], [ string ], "nonpayable">; supportsInterface: TypedContractMethod<[ interfaceId: BytesLike ], [ boolean ], "view">; tokensReceived: TypedContractMethod<[ arg0: AddressLike, arg1: AddressLike, arg2: AddressLike, arg3: BigNumberish, arg4: BytesLike, arg5: BytesLike ], [ void ], "view">; validateUserOp: TypedContractMethod<[ userOp: PackedUserOperationStruct, arg1: BytesLike, missingAccountFunds: BigNumberish ], [ bigint ], "nonpayable">; getFunction(key: string | FunctionFragment): T; getFunction(nameOrSignature: "SUPPORTED_ENTRYPOINT"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "domainSeparator"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "encodeMessageDataForSafe"): TypedContractMethod<[ safe: AddressLike, message: BytesLike ], [ string ], "view">; getFunction(nameOrSignature: "executeUserOp"): TypedContractMethod<[ to: AddressLike, value: BigNumberish, data: BytesLike, operation: BigNumberish ], [ void ], "nonpayable">; getFunction(nameOrSignature: "executeUserOpWithErrorString"): TypedContractMethod<[ to: AddressLike, value: BigNumberish, data: BytesLike, operation: BigNumberish ], [ void ], "nonpayable">; getFunction(nameOrSignature: "getMessageHash"): TypedContractMethod<[message: BytesLike], [string], "view">; getFunction(nameOrSignature: "getMessageHashForSafe"): TypedContractMethod<[ safe: AddressLike, message: BytesLike ], [ string ], "view">; getFunction(nameOrSignature: "getModules"): TypedContractMethod<[], [string[]], "view">; getFunction(nameOrSignature: "getOperationHash"): TypedContractMethod<[userOp: PackedUserOperationStruct], [string], "view">; getFunction(nameOrSignature: "isValidSignature(bytes32,bytes)"): TypedContractMethod<[ _dataHash: BytesLike, _signature: BytesLike ], [ string ], "view">; getFunction(nameOrSignature: "isValidSignature(bytes,bytes)"): TypedContractMethod<[ _data: BytesLike, _signature: BytesLike ], [ string ], "view">; getFunction(nameOrSignature: "onERC1155BatchReceived"): TypedContractMethod<[ arg0: AddressLike, arg1: AddressLike, arg2: BigNumberish[], arg3: BigNumberish[], arg4: BytesLike ], [ string ], "view">; getFunction(nameOrSignature: "onERC1155Received"): TypedContractMethod<[ arg0: AddressLike, arg1: AddressLike, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike ], [ string ], "view">; getFunction(nameOrSignature: "onERC721Received"): TypedContractMethod<[ arg0: AddressLike, arg1: AddressLike, arg2: BigNumberish, arg3: BytesLike ], [ string ], "view">; getFunction(nameOrSignature: "simulate"): TypedContractMethod<[ targetContract: AddressLike, calldataPayload: BytesLike ], [ string ], "nonpayable">; getFunction(nameOrSignature: "supportsInterface"): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; getFunction(nameOrSignature: "tokensReceived"): TypedContractMethod<[ arg0: AddressLike, arg1: AddressLike, arg2: AddressLike, arg3: BigNumberish, arg4: BytesLike, arg5: BytesLike ], [ void ], "view">; getFunction(nameOrSignature: "validateUserOp"): TypedContractMethod<[ userOp: PackedUserOperationStruct, arg1: BytesLike, missingAccountFunds: BigNumberish ], [ bigint ], "nonpayable">; filters: {}; }