Skip to content

chore(account-demo): rebuild aa vendor against viem#5004 (latest) - #105

Merged
meyer9 merged 9 commits into
mainfrom
account-demo-viem-production
Aug 28, 2026
Merged

chore(account-demo): rebuild aa vendor against viem#5004 (latest)#105
meyer9 merged 9 commits into
mainfrom
account-demo-viem-production

Conversation

@chunter-cb

Copy link
Copy Markdown
Contributor

Summary

Pulls the latest main into account-demo-viem-production and rebuilds the self-contained account-abstraction vendor bundle (vendor/aa/index.js) against the current head of wevm/viem#5004 (feat/eip-8130-production @ 0964604).

  • Merge of main: brings in the app restructure (app/demos/*app/vibenet/demos/*, tipsinternal-explorer, benchmark) and the rewritten account demo. main had already migrated the demo to the new EIP-8130 API, so all merge conflicts resolved in favor of main (the old-demo migration commits on this branch are superseded).
  • New aa vendor: rebuilt from the sibling viem checkout at the PR #5004 head, picking up the native-AA send refactor — sendCallssendTransaction, prepareTransactionprepareTransactionRequest, new sendTransactionSync, the eip8130Actions / eip8168Actions decorators + eip8130ChainConfig, and the Keystore rename (keystoreAbi / keystoreAddress).
  • entry.mjs / build.mjs / index.d.ts needed no changes: export * from eip8130 auto-covers the new names, all eip8168 named exports still exist, and the hand-written types already cover the demo surface.

Net diff vs main is just the rebuilt vendor/aa/index.js and the reconciled package-lock.json.

Test plan

  • tsc --noEmit clean (after clearing stale .next/types)
  • npm test — 216/216 pass
  • npm run build — succeeds; demo builds at /vibenet/demos/account
  • Manual smoke of the account demo against vibenet (create / send / key rotation) once viem#5004 lands or the sibling checkout is available in CI

Notes

Draft: viem#5004 is itself still a draft (EIP-8130 not yet frozen), so the vendor bundle is built from the fork branch rather than an npm release. Collapses to npm install viem@latest once the PR ships.

Rebuild vendor/aa from the sibling viem `feat/eip-8130-production` branch,
which drops the experimental `8130`-suffixed export names for the final,
un-suffixed production surface (viem/eip8130 + viem/eip8168).

- entry.mjs: point at the non-experimental `eip8130` / `eip8168` module paths
- vendor/aa/index.js: rebuilt bundle (788 KB) exposing the production surface
- vendor/aa/index.d.ts: rename declarations to match (e.g. to8130Account ->
  toAccount, estimateGas8130 -> estimateGas, waitForTransactionReceipt8130 ->
  waitForTransactionReceipt); drop the removed hashLockChange/lockCall helpers
- AccountDemo.tsx: update all @aa call sites to the un-suffixed names

No behavior change — the same functionality is exposed under the new names.
typecheck, lint, vitest (88 tests), and `next build` all pass.
…omments

Comment-only follow-ups to the eip8130 production migration: update the
`estimateGas8130` doc reference to `estimateGas` in index.d.ts and the
`feat/eip-8130` branch note to `feat/eip-8130-production` in build.mjs.
…rface

Replace the vendored @aa type declarations with the complete production
eip8130 surface (matching the rebuilt bundle) instead of the trimmed,
experimental-era approximation. This pulls in the full new viem, including
symbols the demo doesn't consume yet (fulfillGrantPermissions,
routePermissionedCalls, toPermissionsContext, parsePermissionsContext,
fulfillAddSubAccount, eip8130Capabilities, toSessionPolicyConfig, ...) and
corrects drifted signatures/type names (e.g. newSmartAccount `proxy`,
ToAccountReturnType, ReceiptFields, Transaction).

The production `change()` option `sequence` is now `bigint` (was loosely
typed `number`), so the four account-config change call sites in
AccountDemo.tsx wrap their computed sequence with `BigInt(...)`.

typecheck, lint, vitest (88 tests), and `next build` all pass.
… address

Pick up canonical SessionPolicy 0x813070914C530d030f4Efd8Fa99C18e836435e55
(re-mined after base/eip-8130#80; PolicyManager unchanged).
The eip-8130 tip renamed the AccountConfiguration contract to `Keystore`,
so the live /api/vibenet/contracts payload now emits `eip8130.Keystore`.
`deploymentFromContracts` gated on `eip8130.AccountConfiguration`, so it
returned null and the demo silently fell back to the stale static
addresses — deriving a CREATE2 `from` the node couldn't reproduce
("create address does not match the sender").

Accept either key (Keystore ?? AccountConfiguration) for the core
address-derivation input, and refresh the static VIBENET_DEPLOYMENT
fallback to the current vanity (0x8130…) addresses so a transient fetch
failure still derives correctly.
Callers pass an inline `onClose` (new identity every render), so keying the
modal's focus/scroll-lock effect on `[open, onClose]` re-ran it on every parent
re-render. The cleanup's `previouslyFocused?.focus?.()` then stole focus out of
the panel, so text inputs (account name, transaction metadata, salt, …) lost
focus after a single keystroke.

Hold `onClose` in a ref for the Escape handler and depend the effect on `[open]`
alone, so it runs only on open/close.
…duction

# Conflicts:
#	app/components/ui/Modal.tsx
#	app/demos/account/AccountDemo.tsx
#	app/vibenet/demos/account/library/chains.ts
#	vendor/aa/index.d.ts
#	vendor/aa/index.js
Rebuild vendor/aa/index.js from the sibling viem checkout at the PR #5004
head (feat/eip-8130-production @ 0964604), picking up the native-AA send
surface refactor: sendCalls -> sendTransaction, prepareTransaction ->
prepareTransactionRequest, sendTransactionSync, the eip8130Actions/
eip8168Actions decorators + eip8130ChainConfig, and the Keystore rename
(keystoreAbi/keystoreAddress). Sync package-lock after merging main.

Demo typechecks clean, 216 tests pass, and the production build succeeds.
@cb-heimdall

cb-heimdall commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

⚠️ Ignored Reviews (2)

Reviewer Reason
meyer9 Old or outdated review
meyer9 Review missing MFA

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
omni-ui Ready Ready Preview Aug 27, 2026 6:55pm

Request Review

@meyer9
meyer9 marked this pull request as ready for review August 28, 2026 19:37
@meyer9
meyer9 added this pull request to the merge queue Aug 28, 2026
Merged via the queue into main with commit de9d05e Aug 28, 2026
12 checks passed
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.

3 participants