Skip to content

Commit 23fbf03

Browse files
Zygimantassjxomtmm
authored
feat(zones): add zones (#4510)
* chore: wip * u * chore: wip * fix: zone auth token support - Update ox to 72b35e0 (29-byte token format, no zonePortal) - Remove zonePortal from signAuthorizationToken action - Make defaultStorage() a singleton for shared transport/action storage - Point tests at private RPC (rpc-zone-006-private.tempoxyz.dev) - Remove batching test (deduplication, not batching) - Remove decorator tests Amp-Thread-ID: https://ampcode.com/threads/T-019d65ea-63c9-75f9-970f-7a7f58b73417 * chore: remove skipIf from signAuthorizationToken test Amp-Thread-ID: https://ampcode.com/threads/T-019d65ea-63c9-75f9-970f-7a7f58b73417 * refactor: add JSDoc to zone factory, mark exports as pure Amp-Thread-ID: https://ampcode.com/threads/T-019d65ea-63c9-75f9-970f-7a7f58b73417 * feat: zones docs, client extension pattern, alphabetize sidebar, pin TS 5.9.3 for twoslash * feat: storage utility docs, tempo index export * feat: async Storage with MaybePromise and request deduplication Amp-Thread-ID: https://ampcode.com/threads/T-019d6693-eb27-72df-bf47-72f10f94214e * feat: zone deposit and withdrawal actions - Add deposit/depositSync actions (ZonePortal on parent chain) - Add requestWithdrawal/requestWithdrawalSync actions (ZoneOutbox on zone chain) - Add getWithdrawalFee action (reads withdrawal fee from ZoneOutbox) - Add ZonePortal and ZoneOutbox ABIs in tempo/zones/Abis.ts - Add zoneOutbox address to tempo/Addresses.ts - Add e2e tests for all new actions with error branch coverage - Add docs pages for deposit, requestWithdrawal, getWithdrawalFee Amp-Thread-ID: https://ampcode.com/threads/T-019d66ca-2622-70c9-89c2-b1fbce9b393c * feat: add encrypted deposit and withdrawal zone actions - encryptedDeposit / encryptedDepositSync: ECIES-encrypted deposits (recipient + memo) - requestEncryptedWithdrawal / requestEncryptedWithdrawalSync: withdrawal with revealTo pubkey - encryptDepositPayload: ECDH + HKDF-SHA256 + AES-256-GCM encryption - Zone ABIs: depositEncrypted, sequencerEncryptionKey, encryptionKeyCount, requestEncryptedWithdrawal - Decorator bindings, tests, and docs Amp-Thread-ID: https://ampcode.com/threads/T-019d6740-e918-736a-886a-9ed8e4abb12d * chore: update ox to pkg.pr.new/ox@72b35e0 Amp-Thread-ID: https://ampcode.com/threads/T-019d696d-dac9-770b-9ac9-80592b6d79d7 * chore: fmt * chore: skip encryptedDeposit and requestVerifiableWithdrawal tests Amp-Thread-ID: https://ampcode.com/threads/T-019d6a5f-815c-70ed-ad2c-d4ac7c83d687 * fix: encrypted -> verifiable for withdrawals * fix: withdrawal ABIs * fix: encryption key index * fix: deps * fix: trusted setup * fix: exports * fix: fmt * fix: tests * chore: changeset * fix: update ox dep --------- Co-authored-by: jxom <7336481+jxom@users.noreply.github.com> Co-authored-by: tmm <tmm@tmm.dev>
1 parent 84e1062 commit 23fbf03

40 files changed

Lines changed: 3812 additions & 502 deletions

.changeset/fine-banks-buy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"viem": minor
3+
---
4+
5+
Added Tempo zones support

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ VITE_BATCH_JSON_RPC=false
88
VITE_BATCH_MULTICALL=true
99
VITE_NETWORK_TRANSPORT_MODE=http
1010

11+
VITE_TEMPO_CREDENTIALS= # credentials for Tempo RPCs. format: user:pass
1112
VITE_TEMPO_ENV=localnet # node environment. values: localnet|devnet|testnet
1213
VITE_TEMPO_LOG=false # whether to enable logs, if VITE_TEMPO_ENV=localnet. values: true|debug|error|trace|warn|info
1314
VITE_TEMPO_TAG=latest # docker image tag, if VITE_TEMPO_ENV=localnet.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"ethers": "^6.15.0",
6464
"knip": "^5.64.0",
6565
"micro-eth-signer": "^0.14.0",
66-
"ox": "~0.14.15",
66+
"ox": "0.14.17",
6767
"permissionless": "^0.2.57",
6868
"prool": "~0.2.3",
6969
"publint": "^0.2.12",
@@ -116,7 +116,7 @@
116116
"src": {
117117
"entry": [
118118
"index.ts!",
119-
"{account-abstraction,accounts,actions,celo,chains,ens,experimental,experimental/erc7739,experimental/erc7821,experimental/erc7811,experimental/erc7846,experimental/erc7895,linea,node,nonce,op-stack,siwe,tempo,utils,window,zksync}/index.ts!",
119+
"{account-abstraction,accounts,actions,celo,chains,ens,experimental,experimental/erc7739,experimental/erc7821,experimental/erc7811,experimental/erc7846,experimental/erc7895,linea,node,nonce,op-stack,siwe,tempo,tempo/actions,tempo/zones,utils,window,zksync}/index.ts!",
120120
"chains/utils.ts!"
121121
],
122122
"ignore": [
@@ -242,6 +242,7 @@
242242
],
243243
"pnpm": {
244244
"overrides": {
245+
"typescript": "^5.9.3",
245246
"@opentelemetry/api@^1.8.0": "~1.7.0",
246247
"permissionless>viem": "workspace:*",
247248
"@babel/helpers@<7.26.10": "7.26.10",

0 commit comments

Comments
 (0)