Repository navigation
fix: support anonymous events in AbiEvent.decode and encode - #565
Merged
Merged
Conversation
Anonymous events have no selector topic. `decode` threw `SelectorTopicMismatchError` for every anonymous log, because it read `topics[0]` as the selector, and `encode` prepended a selector that an anonymous log never carries. `decode` now reads every topic as an indexed input for anonymous events, and `encode` returns the indexed topics alone, as on `main`. `encode.ReturnType` widens to allow topics without a selector. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01D3nmWga38V3yjkJET3UZeh
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
|
Published pnpm add ox@pr-565
pnpm add [email protected] |
Merged
gakonst
added a commit
to tempoxyz/accounts
that referenced
this pull request
Nov 3, 2026
Updates `ox` from 0.14.59 to 0.14.62 (`legacy-v0`, published 2026-11-03T04:23:31Z). The catalog, the override and the package's own dependency range all change. The range goes from `~0.14.59` to `~0.14.62`, so this adds a patch changeset. Follows #943, which updated Viem. ## What 0.14.62 brings - wevm/ox#571 backports #569 and #570: - `Hex.assert`, `Value`, `TypedData`, `Siwe.isUri` and ABI overload resolution reuse module-level regular expressions instead of building new ones on every call. - `AbiItem.getSignatureHash` and `AbiItem.getSelector` cache signature hashes in a bounded cache that `Caches.clear` resets. So do the selector lookups in `AbiItem.fromAbi`, `AbiFunction.decodeData`, `AbiEvent.decodeLog` and `AbiEvent.extractLogs`. - wevm/ox#565: `AbiEvent.decode` and `AbiEvent.encode` handle anonymous events. The range also picks up 0.14.60 and 0.14.61. The `eth_fillTransaction` result `tx` is now typed as a `OneOf` union. `AbiItem.fromAbi` throws `AmbiguityError` for overloads it can't tell apart. `AbiParameters.decode` checks integer ranges and address padding. Envelope `assert` rejects a tip above a zero `maxFeePerGas`. `TypedData` validates types more strictly. `KeyAuthorization` `isAdmin` is deprecated for TIP-1137. None of these needed changes here, and every suite passes unchanged. ## Lockfile As in #943, the lockfile is edited directly, because a full resolution adds a real `[email protected]` peer. Only the `ox` entries change: the version, the integrity, and the specifiers set by the override. `ox` 0.14.62 has the same dependencies as 0.14.59. It isn't a peer of any package, so no hashed peer suffix includes it. `ox` is excluded from `minimumReleaseAge`. ## Validation - `pnpm install --frozen-lockfile` from empty `node_modules`: passed. - `pnpm check:types`: passed. - `pnpm check`: 0 errors; the 5 warnings are already on `main`. - `pnpm build`: passed. - `pnpm test --project lib/pure --reporter=dot`: 50 files, 889 tests passed. - `VITE_NODE_ENV=localnet VITE_NODE_TAG=latest pnpm test --project lib/localnet --reporter=dot --maxWorkers=4` against `ghcr.io/tempoxyz/tempo:latest` in OrbStack: 10 files, 658 tests passed.
This branch was successfully deployed
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.
Backport to
0.xof the anonymous-event support thatmaingot in v1 (#231). Related: #564 and wevm/viem#5375.Anonymous events have no selector topic. On
0.x:decodereadtopics[0]as the selector, so it threwSelectorTopicMismatchErrorfor every anonymous log.encodeprepended a selector that an anonymous log never carries.Now, for anonymous events,
decodereads every topic as an indexed input, andencodereturns the indexed topics alone, as onmain. Normal events are unchanged.Type change:
encode.ReturnType['topics']widens from[selector, ...topics]to also allow topics without a selector, matchingmain. Code that readstopics[0]as a guaranteed selector now sees a possibly-undefined value undernoUncheckedIndexedAccess.0.xhas noextractLogsordecodeLog, so the opt-in matching from #564 doesn't apply here.0.xalso has no fuzz setup (nofast-check), so this PR adds deterministic tests only: anonymousdecodewith and without indexed inputs, a missing topic,encode, and anencode→decoderound trip.Validation: the
AbiEventunit tests pass except the 2networktests, which need anvil (not available locally).tsc --noEmitand Biome pass.Generated by Claude Code