From eb977e42d79211007386e443dbbd2adcc4e75ab7 Mon Sep 17 00:00:00 2001 From: Filip Date: Mon, 25 May 2026 23:34:22 +0200 Subject: [PATCH] chore: wire NEXUS_122 ABI into decoder fallback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The decoder in `parse-user-op-calldata.ts` tried `NEXUS_120` and `NEXUS_121` but never `NEXUS_122` — the file existed and was committed when Nexus 1.2.2 landed but was never referenced. Today this is a no-op because `nexus-121.ts` and `nexus-122.ts` are byte-identical (the only diff is the export name), so any calldata that decodes against 121 also decodes against 122. But if 122 ever diverges, the fallback would silently return `undefined` and downstream callers would log "calldata not recognized" for valid UserOps. Forward-compat hygiene only — no behavior change today. Unrelated to MEE v2.2.2; orthogonal preparation that should land first so the v2.2.2 PR is a focused one-line dep bump. --- src/modules/quotes/utils/parse-user-op-calldata.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/modules/quotes/utils/parse-user-op-calldata.ts b/src/modules/quotes/utils/parse-user-op-calldata.ts index 06d28386..cd6a58da 100644 --- a/src/modules/quotes/utils/parse-user-op-calldata.ts +++ b/src/modules/quotes/utils/parse-user-op-calldata.ts @@ -1,5 +1,6 @@ import { NEXUS_120 } from "@/contracts/resources/nexus-120"; import { NEXUS_121 } from "@/contracts/resources/nexus-121"; +import { NEXUS_122 } from "@/contracts/resources/nexus-122"; import { Logger } from "@/core/logger"; import { MeeUserOp } from "@/user-ops"; import Container from "typedi"; @@ -42,10 +43,16 @@ function decodeInstructions( return decodeNexusCallData(meeUserOp.userOp.callData, NEXUS_121 as Abi); } catch (executeError) {} + // attempt to decode with nexus 122 abi + try { + logger.trace({ meeUserOp }, "Decoding instructions. Using NEXUS_122."); + return decodeNexusCallData(meeUserOp.userOp.callData, NEXUS_122 as Abi); + } catch (executeError) {} + // no abi found logger.trace( { meeUserOp }, - "Decoding instructions. Calldata not recognized by NEXUS_120 or NEXUS_121 abis.", + "Decoding instructions. Calldata not recognized by NEXUS_120, NEXUS_121 or NEXUS_122 abis.", ); return undefined; }