feat: support MEE v2.2.2 (bump @biconomy/abstractjs to ^1.2.4)#212
Open
fichiokaku wants to merge 1 commit into
Open
feat: support MEE v2.2.2 (bump @biconomy/abstractjs to ^1.2.4)#212fichiokaku wants to merge 1 commit into
fichiokaku wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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:
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