Skip to content

Conversation

@PaulRBerg
Copy link
Contributor

Adds formatEventSignature utility to format ABI events with indexed keywords.

Implements the proposal from #3765

Adds formatEventSignature function that formats ABI events into signature strings with 'indexed' keywords prepended to indexed parameters.

This format is required by blockchain indexers like The Graph that need to distinguish indexed parameters in event signatures.

Handles complex types including tuples, nested tuples, and array types. Includes 17 comprehensive tests covering edge cases.
@changeset-bot
Copy link

changeset-bot bot commented Oct 12, 2025

🦋 Changeset detected

Latest commit: 181b369

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 12, 2025

Open in StackBlitz

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

commit: 181b369

@PaulRBerg
Copy link
Contributor Author

Tests are failing but the issue seems unrelated to this PR

CleanShot 2025-10-18 at 11 54 04@2x

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