Skip to content

fix(tempo): align Zone actions with the current protocol - #5199

Open
struong wants to merge 9 commits into
mainfrom
struong/zone-protocol-compat
Open

struong wants to merge 9 commits into
mainfrom
struong/zone-protocol-compat

Conversation

@struong

@struong struong commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Aligned Zone actions with tempoxyz/zones@7c4fc9aed89759bc4123cfc230d7aff368eaa446. Kept encryptedDeposit / encryptedDepositSync and their existing helpers, and removed the obsolete plaintext deposit / depositSync pair.

Motivation

The current ZonePortal requires encrypted deposit payloads, and the Zone RPC supplies imported Tempo block height through zone_getZoneInfo. The plaintext action and removed deposit-status RPC fallback were incompatible with this protocol.

Changes

  • Consolidated encrypted deposit submission and added prepared-sender/chain validation and strict 32-byte memo validation, while preserving Sync receipt revert handling.
  • Fixed Moderato authorization scopes and current Zone 6/7 portal derivation while preserving legacy address mappings.
  • Exposed access/gateway flags and imported block height, and corrected deposit-outcome correlation to use DepositMade.newCurrentDepositQueueHash.
  • Documented encrypted deposit defaults and validation, Sync options, source-aware authorization scopes, portal selection, metadata, and deposit outcomes; included a major changeset with migration examples for plaintext callers.
  • Updated regression coverage in the existing zone.test.ts and zone.test-d.ts files using the established Tempo test harness.

Testing

  • Zone metadata RPC cases: reproduced the CI snapshot failure and verified both cases passed after correcting the expected token address.
  • Zone API type tests: all 17 passed with an isolated temporary configuration.
  • The existing Local Tempo CI jobs containing zone.test.ts passed on both T13 and Tnext after correcting the metadata snapshot.
  • pnpm build:types: passed.
  • Scoped Biome checks and git diff --check: passed.
  • pnpm --filter site exec vocs twoslash 'pages/tempo/{actions/zone.{encryptedDeposit,getZoneInfo,signAuthorizationToken},guides/zones/{deposit,connect},guides/earn/zones}.mdx': all 44 examples passed.

pnpm check:types remained blocked by missing generated contract fixtures (contracts/generated.ts) and related errors in unrelated tests; no changed Tempo or site files reported errors. The standard Local Tempo CI job already includes the Zone suite. The existing GitHub verification run failed at pnpm audit for unchanged sharp and @modelcontextprotocol/sdk dependencies.

@changeset-bot

changeset-bot Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0ae3c85

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
viem Ready Ready Preview Oct 14, 2026 4:59pm UTC

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/viem@5199

commit: 0ae3c85

This branch was successfully deployed

1 active deployment
Preview — 0ae3c85f Deployed Oct 14, 2026 by vercel[bot]
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.

2 participants