Skip to content

feat: support MEE v2.2.2 (bump @biconomy/abstractjs to ^1.2.4)#212

Open
fichiokaku wants to merge 1 commit into
developfrom
feat/support-mee-v2-2-2
Open

feat: support MEE v2.2.2 (bump @biconomy/abstractjs to ^1.2.4)#212
fichiokaku wants to merge 1 commit into
developfrom
feat/support-mee-v2-2-2

Conversation

@fichiokaku
Copy link
Copy Markdown
Collaborator

Summary

Unlocks MEE v2.2.2 support in mee-node by bumping `@biconomy/abstractjs` from `^1.0.13` → `^1.2.4`. v2.2.2 ships the audited ERC-8211 reference implementation, a new Nexus 1.3.2 implementation, and updated deterministic deployment addresses on all supported chains. The bumped abstractjs exposes `MEEVersion.V2_2_2` and its full config (factory / bootstrap / Nexus / validator / etherForwarder addresses, `composabilityVersion`, `accountId: "biconomy.nexus.1.3.2"`).

What this does NOT touch

  • `meeVersionSchema` — `"2.2.2"` was already added in `d357670` ("feat: added mee version 2.2.2 support"). Nothing to do.
  • `nexus-12X` ABIs — Nexus 1.3.1 → 1.3.2 is ABI-equivalent. The only diffs are the `accountId()` and `_domainNameAndVersion()` string constants — function signatures, events, and storage layout are unchanged. No new `nexus-132.ts` file is required.
  • `parse-user-op-calldata.ts` decoder — already handles `executeComposable` and the existing `NEXUS_121` fallback covers v2.2.2 calldata one-to-one. (Wiring `NEXUS_122` into the fallback chain is a separate hygiene PR — see chore: wire NEXUS_122 ABI into decoder fallback #211.)

Why the gas-estimator type swap

mee-node consumes zero runtime APIs from abstractjs — the only use was a deep type-only import in `gas-estimator-v2.service.ts`:

```ts
import { type GrantPermissionResponse } from "@biconomy/abstractjs/dist/_types/modules/validators/smartSessions/decorators/grantPermission";
```

The Smart Sessions revamp in abstractjs 1.2.0 changed `GrantPermissionResponse` from a single object (`{ enableSessionData, signature, ... }`) to `GrantPermissionResponseEntry[]` (an array). The mee-node call site in `getSmartSessionUseModeVerificationGasLimit` accesses `sessionDetails.enableSessionData.enableSession.sessionToEnable.actions` — which no longer typechecks against the array form. However, mee-node already defines its own local zod-inferred `GrantPermissionResponseType` for the same concept, and that's actually what gets passed in at runtime (the abstractjs type was only used for the parameter annotation).

This PR swaps the deep abstractjs import for the local `GrantPermissionResponseType` from `@/sessions`. Net effects:

  1. Smart Sessions revamp compatibility — no type mismatch.
  2. mee-node no longer depends on abstractjs's evolving internal type tree.
  3. The runtime behavior is unchanged — the local zod type already matched the actual runtime shape.

TypeScript

`bunx tsc --project tsconfig.build.json --noEmit` after the bump has the same error profile as `develop` — no new type regressions introduced.

Test plan

  • CI green on `develop` base
  • Verify a quote/simulation flow that exercises the Smart Session use-mode gas estimator still works (no runtime regression from the type swap)

MEE v2.2.2 ships the audited ERC-8211 reference implementation, a new
Nexus 1.3.2 implementation, and updated deterministic deployment
addresses. mee-node picks up support by bumping @biconomy/abstractjs
from ^1.0.13 to ^1.2.4, which exposes MEEVersion.V2_2_2 and its config
map (DEFAULT_CONFIGURATIONS_BY_MEE_VERSION).

mee-node consumes zero runtime APIs from abstractjs — the only use was
a deep type import for GrantPermissionResponse from
@biconomy/abstractjs/dist/_types/modules/validators/smartSessions/decorators/grantPermission.
The Smart Sessions revamp in abstractjs 1.2.0 changed that type from a
single object to GrantPermissionResponseEntry[] (an array), which
breaks structural compatibility with mee-node's local zod-inferred
GrantPermissionResponseType.

Swap the deep abstractjs type import in gas-estimator-v2.service.ts for
the local GrantPermissionResponseType from @/sessions. The local type
is derived from mee-node's own zod schema for the same concept and
matches the runtime shape the gas estimator actually receives. Side
benefit: mee-node no longer depends on abstractjs's evolving internal
type tree.

No new functionality, no schema changes, no decoder changes — the
v2.2.2 enum entry was already added to meeVersionSchema in d357670.
The Nexus 1.3.1 → 1.3.2 change is ABI-equivalent (only accountId
and _domainNameAndVersion string constants change), so no new
nexus-132.ts ABI file is required.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant