Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/modules/quotes/utils/parse-user-op-calldata.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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;
}
Expand Down
Loading