Skip to content
This repository has been archived by the owner on Jan 31, 2025. It is now read-only.

refactor: remove protocol fee checks in MerkleStreamerLL #257

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

smol-ninja
Copy link
Member

@smol-ninja smol-ninja commented Jan 10, 2024

Closes #256

Description

This PR removes protocol fee checks in MerkleStreamerLL and allows claiming even when the protocol fee is greater than 0. When $protocolFee>0$ then ${claimAmount}=(amount - protocolFee)$.

Changes

  • SablierV2MerkleStreamer.sol - Removes protocol fee checks in _checkClaim and clawback.
  • Errors.sol - Removes SablierV2MerkleStreamer_ProtocolFeeNotZero.

Testing

  • claim.t.sol: Removes test_RevertGiven_ProtocolFeeNotZero and adds test_Claim_ProtocolFeeNotZero.
  • clawback.t.sol: Removes modifiers givenProtocolFeeZero and givenProtocolFeeNotZero as clawback does not check for protocol fee anymore
  • Updates branching trees.

Related: https://github.com/sablier-labs/company-discussions/discussions/28

@smol-ninja smol-ninja changed the base branch from main to staging January 10, 2024 10:01
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.

LOCKUP is no longer used in abstract contract MerkleStreamer, thus it should be removed

/// @inheritdoc ISablierV2MerkleStreamer
ISablierV2Lockup public immutable override LOCKUP;

This PR should have basically undo the changes made here: #220

src/SablierV2MerkleStreamerLL.sol Outdated Show resolved Hide resolved
src/SablierV2MerkleStreamerLL.sol Outdated Show resolved Hide resolved
Copy link
Member

@PaulRBerg PaulRBerg left a comment

Choose a reason for hiding this comment

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

That's a beautiful PR body message, thanks for the detailed report, @smol-ninja.

Feedback below.

@andreivladbrg
Copy link
Member

@smol-ninja pushed a new commit, can you double check that the PR looks good now?

@smol-ninja
Copy link
Member Author

Thanks Andrei for the commit. I didn't notice those Notes in the interface file. Looks good to me now.

@andreivladbrg andreivladbrg merged commit 01d7b56 into staging Jan 10, 2024
6 of 7 checks passed
@smol-ninja smol-ninja deleted the refactor/fee-check branch January 10, 2024 16:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove fee checks in MerkleStreamerLL
3 participants