sablier-labs / v2-core

⏳ Core smart contracts of the Sablier V2 token distribution protocol
https://sablier.com
Other
288 stars 38 forks source link

feat: hook allowlist #951

Closed PaulRBerg closed 6 days ago

PaulRBerg commented 1 week ago

Addresses M-03: The caller of withdraw and renounce can skip callbacks, by sending less gas.

See related discussion: https://github.com/sablier-labs/v2-core/discussions/952

PaulRBerg commented 1 week ago

Thanks for the kind words, @andreivladbrg.

I will respond to your questions in the separate discussion thread.

smol-ninja commented 1 week ago

@andreivladbrg about your question: Why not return a bool in hook functions and check it?

This answer from stack overflow put it really well

Screenshot 2024-06-22 at 11 42 56
andreivladbrg commented 1 week ago

@andreivladbrg about your question: Why not return a bool in hook functions and check it?

fair enough, thanks for sharing

smol-ninja commented 1 week ago

Can we all please give it a final review and approve the PR so that it can be merged? cc @PaulRBerg @andreivladbrg

PaulRBerg commented 6 days ago

The PR looks good to me now. Thanks both for your contributions.

Let's squash and merge!