Skip to content

fix(abi): handle anonymous events in encodeEventTopics#4582

Closed
tenderdeve wants to merge 1 commit into
wevm:mainfrom
tenderdeve:fix/4461-anonymous-event-topics-v2
Closed

fix(abi): handle anonymous events in encodeEventTopics#4582
tenderdeve wants to merge 1 commit into
wevm:mainfrom
tenderdeve:fix/4461-anonymous-event-topics-v2

Conversation

@tenderdeve
Copy link
Copy Markdown

encodeEventTopics unconditionally prepends the event signature as topic[0], which is incorrect for anonymous events. Anonymous events do not emit a signature topic and can use all 4 topic slots for indexed parameters.

This moves the signature computation after the argument encoding and skips it when the event has anonymous: true.

Fixes #4461

Anonymous events do not have a signature topic. Skip prepending the
event selector when the abiItem has anonymous: true, and return only
the indexed argument topics.

Fixes wevm#4461
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 5, 2026

⚠️ No Changeset found

Latest commit: 0ee3fa1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

@tenderdeve is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

@jxom jxom closed this May 5, 2026
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.

encodeEventTopics() (and watchLogs()) do not handle anonymous events

2 participants