Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mouseless0x committed Jan 30, 2025
1 parent fc199f3 commit 61c81d6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/executor/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ export class Executor {
}) {
const { isUserOpV06, entryPoint, userOps } = txParam

const handleOpsCalldata = encodeHandleOpsCalldata(userOps, entryPoint)
const handleOpsCalldata = encodeHandleOpsCalldata({
userOps,
beneficiary: txParam.account.address
})

const request =
await this.config.walletClient.prepareTransactionRequest({
Expand Down
15 changes: 9 additions & 6 deletions src/executor/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,16 @@ export const packUserOps = (userOpInfos: UserOpInfo[]) => {
return packedUserOps as PackedUserOperation[]
}

export const encodeHandleOpsCalldata = (
userOpInfos: UserOpInfo[],
export const encodeHandleOpsCalldata = ({
userOps,
beneficiary
}: {
userOps: UserOpInfo[]
beneficiary: Address
): Hex => {
const userOps = userOpInfos.map(({ userOp }) => userOp)
const isV06 = isVersion06(userOps[0])
const packedUserOps = packUserOps(userOpInfos)
}): Hex => {
const ops = userOps.map(({ userOp }) => userOp)
const isV06 = isVersion06(ops[0])
const packedUserOps = packUserOps(userOps)

return encodeFunctionData({
abi: isV06 ? EntryPointV06Abi : EntryPointV07Abi,
Expand Down

0 comments on commit 61c81d6

Please sign in to comment.