Skip to content

chore(deps): update Aztec packages to v5.0.0 stable - #59

Merged
Thunkar merged 2 commits into
mainfrom
gj/update-to-v5-stable
Jul 13, 2026
Merged

chore(deps): update Aztec packages to v5.0.0 stable#59
Thunkar merged 2 commits into
mainfrom
gj/update-to-v5-stable

Conversation

@Thunkar

@Thunkar Thunkar commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Aztec v5.0.0 is out. This bumps every @aztec/* dependency from 5.0.0-rc.2 to the stable 5.0.0 release across all four workspaces (shared, web, extension, app) and migrates the breaking API changes between the RC and the stable release.

API changes migrated

  • Contract instance preimage model. pxe.getContractInstance() now returns ContractInstancePreimageWithAddress, which exposes originalContractClassId instead of currentContractClassId (the current class id is now chain-tracked state, not part of the preimage). Updated DecodingCache, tx-callstack-decoder.ts, and call-authorization-formatter.ts.
  • Wallet.registerContract signature is now (instance: ContractInstancePreimage, artifact?, secretKeyOrKeys?: Fr | MasterSecretKeys) => Promise<void>. Updated the ExternalWallet override and rewrote RegisterContractOperation to:
    • register the contract class and instance independently (registerContractClass() + registerContract(instance)),
    • derive privacy keys before registerAccount (it now takes AccountPrivacyKeys, not a raw Fr),
    • compute the address from the preimage via computeContractAddressFromInstance,
    • drop the removed pxe.updateContract path (upgrades are chain-tracked now).

Verification

Check Result
typecheck (shared/web/app) ✅ pass
extension tsc ✅ pass
test ✅ 31 pass
lint ✅ 0 errors
web production build (tsc -b && vite build) ✅ built

Full wxt build (extension) and Electron package/make (app) were not run — they need native BB binaries — but both are type-clean via their tsc steps.

🤖 Generated with Claude Code

Bump all @aztec/* packages from 5.0.0-rc.2 to the stable 5.0.0 release
across every workspace (shared, web, extension, app) and migrate the
breaking API changes between the RC and the stable release:

- PXE now stores/returns contract instance *preimages*
  (ContractInstancePreimageWithAddress): they expose
  originalContractClassId instead of currentContractClassId, which is
  now chain-tracked state. Update DecodingCache, the tx callstack
  decoder and the call-authorization formatter accordingly.
- Wallet.registerContract is now
  (instance: ContractInstancePreimage, artifact?, secretKeyOrKeys?:
  Fr | MasterSecretKeys) => Promise<void>. Update the ExternalWallet
  override and rewrite RegisterContractOperation to register the
  contract class and instance independently, derive privacy keys
  before registerAccount, compute the address from the preimage, and
  drop the removed pxe.updateContract path.

Verified: typecheck (shared/web/app + extension tsc), tests (31 pass),
lint (0 errors) and the web production build all pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

🚀 Web wallet deployed!

Preview URL: https://demo-wallet-acnc4d3jb-thunkars-projects.vercel.app

v5's pxe.getContractInstance returns only the immutable address preimage
(originalContractClassId), so decoding an upgraded contract's calls against
that class id would pick a stale artifact (or none, if only the new class's
artifact is registered), producing wrong or missing function/contract names.

Resolve the effective (current) contract class id from chain state via
node.getContract().currentContractClassId, falling back to the preimage's
originalContractClassId when the contract isn't published on-chain (local
registrations, where original and current are necessarily equal). The lookup
is memoized per address in DecodingCache, so it costs at most one node call
per address per session. All six decoder sites now go through the new
getContractArtifactForAddress helper.

resolveContractName is intentionally left on originalContractClassId: it names
a preimage at registration time (not yet on chain), where original == current.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Thunkar
Thunkar merged commit 36b354f into main Jul 13, 2026
8 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.

1 participant