From df153fde0fbc8fcce8247088fb819fcf51bcfaa9 Mon Sep 17 00:00:00 2001 From: Garvit Khatri Date: Wed, 18 Dec 2024 08:36:15 +0000 Subject: [PATCH 1/3] Fix paymasterAndDataSize --- src/utils/userop.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utils/userop.ts b/src/utils/userop.ts index 69fdf852..3347aa19 100644 --- a/src/utils/userop.ts +++ b/src/utils/userop.ts @@ -27,6 +27,7 @@ import { pad, parseAbi, parseEventLogs, + size, slice, toHex, zeroAddress @@ -132,11 +133,15 @@ export function unpackPaymasterAndData(paymasterAndData: Hex) { paymasterData: null } } + + const paymasterAndDataSize = size(paymasterAndData) + return { paymaster: getAddress(slice(paymasterAndData, 0, 20)), paymasterVerificationGasLimit: BigInt(slice(paymasterAndData, 20, 36)), paymasterPostOpGasLimit: BigInt(slice(paymasterAndData, 36, 52)), - paymasterData: slice(paymasterAndData, 52) + paymasterData: + paymasterAndDataSize > 52 ? slice(paymasterAndData, 52) : null } } From 87056b4a0884a0a9f8dd8534735deb66540aa3bc Mon Sep 17 00:00:00 2001 From: Garvit Khatri Date: Wed, 18 Dec 2024 08:41:40 +0000 Subject: [PATCH 2/3] Add changeset --- .changeset/calm-brooms-flow.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/calm-brooms-flow.md diff --git a/.changeset/calm-brooms-flow.md b/.changeset/calm-brooms-flow.md new file mode 100644 index 00000000..ca39a1b9 --- /dev/null +++ b/.changeset/calm-brooms-flow.md @@ -0,0 +1,5 @@ +--- +"@pimlico/alto": patch +--- + +Version update till Dec 18 From c94f4cef5415a5ea34d51cd19c957918ce0057d8 Mon Sep 17 00:00:00 2001 From: Garvit Khatri Date: Wed, 18 Dec 2024 14:12:14 +0530 Subject: [PATCH 3/3] Update calm-brooms-flow.md --- .changeset/calm-brooms-flow.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/calm-brooms-flow.md b/.changeset/calm-brooms-flow.md index ca39a1b9..55c9c5f4 100644 --- a/.changeset/calm-brooms-flow.md +++ b/.changeset/calm-brooms-flow.md @@ -2,4 +2,4 @@ "@pimlico/alto": patch --- -Version update till Dec 18 +Version updated till Dec 18