Skip to content

feat: function to calculate min fee in wei for a given stream ID #1270

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

Merged
merged 2 commits into from
Jul 10, 2025

Conversation

smol-ninja
Copy link
Member

@smol-ninja smol-ninja commented Jul 7, 2025

Refer to sablier-labs/evm-utils#44.

Depends on #1268.

Note

The new function calculateMinFeeWei is added to Lockup contract because it would be useful for external contracts to query fee for a given stream ID from the Lockup contract itself and then use the returned value in the withdraw function. Without the function, they will have to query it from comptroller using stream's sender and then use that value in withdraw function - a poor UX.


This PR also resolves Cantina finding 19.

Copy link
Member

@andreivladbrg andreivladbrg left a comment

Choose a reason for hiding this comment

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

LGTM, just one comment:

@andreivladbrg andreivladbrg force-pushed the refactor/ComptrollerManager branch 3 times, most recently from 11773f4 to b5c157c Compare July 9, 2025 20:51
@smol-ninja smol-ninja force-pushed the refactor/ComptrollerManager branch from 3b49c5b to d915e5e Compare July 9, 2025 21:44
Base automatically changed from refactor/ComptrollerManager to staging July 9, 2025 21:50
smol-ninja and others added 2 commits July 9, 2025 22:52
refactor: use the new function to calculate min fee in wei
test: add integration test for calculateMinFeeWei
@smol-ninja smol-ninja merged commit b4cf6c6 into staging Jul 10, 2025
9 checks passed
@andreivladbrg andreivladbrg deleted the chore/fee-getters branch July 10, 2025 11:51
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.

2 participants