Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(contract): implement Filter's builder methods on Event #960

Merged
merged 2 commits into from
Jun 24, 2024

Conversation

alexfertel
Copy link
Contributor

Motivation

Resolves #824

Solution

This PR adds builder methods to alloy_contract::Event that mirror Filter's builder methods, forwarding calls such that you can customize the filter from the event.

Tbh, I don't like copy-pasting all of this, but I think the DX improvement is worth it.

Adds a single test, since the inner methods are tested in Filter's tests.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

seems appropriate.

don't mind duplicating this

pending @DaniPopes

@mattsse mattsse added the enhancement New feature or request label Jun 24, 2024
@mattsse mattsse merged commit ea0cffc into alloy-rs:main Jun 24, 2024
22 checks passed
@alexfertel alexfertel deleted the build-filter-from-event branch June 24, 2024 12:03
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
…#960)

* feat(contract): implement Filter's builder methods on Event

* lint: appease clippy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Implement Filter's builder methods on alloy_contract::Event
3 participants