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

[BeforeSend Hook]: Merge TrackBeforeSend and BlockBeforeSend #6775

Open
AlpinYukseloglu opened this issue Oct 27, 2023 · 1 comment
Open

Comments

@AlpinYukseloglu
Copy link
Contributor

Background

After the patch in #6757, the distinction between TrackBeforeSend and BlockBeforeSend no longer makes sense to make, as the only difference between the two were that one was metered and the other wasn't, and now both are metered.

Suggested Design

  • Combine TrackBeforeSend and BlockBeforeSend into a single BeforeSend message/hook

Acceptance Criteria

  • All new and existing tests pass
  • It is confirmed that this isn't actively in use by important contracts and that the API break is okay
@mattverse
Copy link
Member

mattverse commented Oct 30, 2023

@AlpinYukseloglu I don't quite follow the reason they should be merged yet, can you elaborate more?

The key difference between the two are the API design, where one returns an error and one does not. That is, contracts can use TrackBeforeSend when they have an instance where contract needs to be called but has an error that needs to be gracefully silenced and use BlockBeforeSend to actually stop the send action from happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Triage 🔍
Development

No branches or pull requests

2 participants