Skip to content

Event bindings review fixes - #1565

Merged
Ryang-21 merged 8 commits into
mainfrom
event-bindings-review-fixes
Jul 28, 2026
Merged

Event bindings review fixes#1565
Ryang-21 merged 8 commits into
mainfrom
event-bindings-review-fixes

Conversation

@Ryang-21

@Ryang-21 Ryang-21 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

What

  • findEvent now returns undefined for an unmatched event instead of throwing.
  • Generated event names that collide after case conversion are disambiguated in the bindings output.
  • Event filter topic values in generated bindings now use the input (encode-side) types.
  • Parsed event data is stored on a null-prototype object, so keys like constructor can't collide with Object.prototype.
  • The event_spec barrel now exports only ParsedEvent.
  • The e2e SAC transfer test tolerates an already-deployed native SAC on reruns.

Copilot AI review requested due to automatic review settings July 25, 2026 00:20
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Jul 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates event handling and generated bindings for safer parsing, collision-free names, and encode-side filter types.

Changes:

  • Makes findEvent return undefined and narrows event exports.
  • Hardens parsed event objects and binding generation.
  • Improves tests, documentation, snapshots, and SAC rerun handling.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/contract/spec.ts Updates the public findEvent API.
src/contract/event_spec.ts Adds safe lookup and null-prototype event data.
src/contract/index.ts Exports only the event result type.
src/bindings/types.ts Disambiguates generated event interfaces.
src/bindings/client.ts Disambiguates filters and uses input types.
test/unit/spec/event_spec.test.ts Tests lookup and prototype safety.
test/unit/bindings/collisions.test.ts Tests generated-name collisions.
test/e2e/src/non-sim-sac-transfer.test.ts Tolerates an existing native SAC.
test/e2e/src/__snapshots__/bindings.test.ts.snap Updates generated filter signatures.
docs/reference/contracts-client.md Documents the breaking API change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/bindings/types.ts Outdated
return this.eventInterfaceNames;
}

const reserved = new Set<string>();
Comment thread src/bindings/client.ts
@Ryang-21
Ryang-21 requested a review from quietbits July 25, 2026 00:29
@Ryang-21
Ryang-21 merged commit 5aaba3c into main Jul 28, 2026
12 checks passed
@Ryang-21
Ryang-21 deleted the event-bindings-review-fixes branch July 28, 2026 00:10
@github-project-automation github-project-automation Bot moved this from Backlog (Not Ready) to Done in DevX Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants