From 2d849186334c038bc131b1bfe84f9d56d107ee62 Mon Sep 17 00:00:00 2001 From: mouseless <97399882+mouseless-eth@users.noreply.github.com> Date: Wed, 9 Oct 2024 17:45:04 +0100 Subject: [PATCH] add checks for v0.6 --- src/executor/executor.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/executor/executor.ts b/src/executor/executor.ts index 3288fffe..64dca93c 100644 --- a/src/executor/executor.ts +++ b/src/executor/executor.ts @@ -520,6 +520,7 @@ export class Executor { async sendHandleOpsTransaction( userOps: PackedUserOperation[], + isUserOpVersion06: boolean, entryPoint: Address, opts: | { @@ -542,7 +543,7 @@ export class Executor { const request = await this.walletClient.prepareTransactionRequest({ to: entryPoint, data: encodeFunctionData({ - abi: EntryPointV07Abi, + abi: isUserOpVersion06 ? EntryPointV06Abi : EntryPointV07Abi, functionName: "handleOps", args: [userOps, opts.account.address] }), @@ -778,6 +779,7 @@ export class Executor { transactionHash = await this.sendHandleOpsTransaction( userOps, + isUserOpVersion06, entryPoint, opts )