Skip to content

[ETHEREUM-CONTRACTS] v1.13.0: SuperfluidPool: add [increase|decrease]MemberUnits and deprecate PoolMemberNFT#2077

Merged
hellwolf merged 15 commits intodevfrom
2025-06-incdec_poolunits
Jun 30, 2025
Merged

[ETHEREUM-CONTRACTS] v1.13.0: SuperfluidPool: add [increase|decrease]MemberUnits and deprecate PoolMemberNFT#2077
hellwolf merged 15 commits intodevfrom
2025-06-incdec_poolunits

Conversation

@d10r
Copy link
Collaborator

@d10r d10r commented Jun 16, 2025

This PR contains:

Additionally there's a small optimization: GDA._isPool() is replicated in SuperfluidPool.sol.
This shaves off a few thousand gas for [update|increase|decrease]MemberUnit, because it removes an indirection through the GDA which adds 2 external calls (proxy and logic contract).

The version is bumped to v1.13.0 because disabling the PoolMemberNFT update hooks is technically a breaking changes.

This PR doesn't yet remove all the PoolMemberNFT related code because for the deprecation its logic contract is updated one last time. After that, more of the related code can be removed.

v1.13.0 also contains the already merged #2057

@d10r d10r requested a review from hellwolf as a code owner June 16, 2025 07:54
@github-actions
Copy link

github-actions bot commented Jun 16, 2025

Changelog Reminder

Reminder to update the CHANGELOG.md for any of the modified packages in this PR.

  • CHANGELOG.md modified
  • Double check before merge

@d10r d10r requested a review from kasparkallas as a code owner June 16, 2025 19:22
@d10r d10r changed the title [ETHEREUM-CONTRACTS] add increaseMemberUnits and decreaseMemberUnits to ISuperfluidPool [ETHEREUM-CONTRACTS] v1.13.0: SuperfluidPool: add [increase|decrease]MemberUnits and deprecate PoolMemberNFT Jun 17, 2025
@codecov
Copy link

codecov bot commented Jun 17, 2025

Codecov Report

Attention: Patch coverage is 79.41176% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...racts/contracts/agreements/gdav1/PoolMemberNFT.sol 0.00% 7 Missing ⚠️

📢 Thoughts on this report? Let us know!

}

_handlePoolMemberNFT(memberAddr, newUnits);
// replicates GDAv1._isPool in order to eliminate unnecessary gas cost (less external calls)
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a low hanging fruit of not violating DRY: Extract the storage related function as a global "free" function so that reusing is strictly inlining same code in two different contracts (gda logic or the pool logic).

Copy link
Contributor

Choose a reason for hiding this comment

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

if you want faster 1.13 progress, removing this particular change is also okay for me. But I ask for no code quality degradation by not repeating code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is it ok like this?
35e54ee

@d10r d10r force-pushed the 2025-06-incdec_poolunits branch from 2b12728 to 35e54ee Compare June 18, 2025 14:50
@hellwolf
Copy link
Contributor

I will propose a small improvement in the next commit.

Copy link
Contributor

@hellwolf hellwolf left a comment

Choose a reason for hiding this comment

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

I will continue the storage layout code refactoring in #2086

@hellwolf hellwolf merged commit 8ac8ca4 into dev Jun 30, 2025
26 of 27 checks passed
@hellwolf hellwolf deleted the 2025-06-incdec_poolunits branch June 30, 2025 10:24
@github-actions
Copy link

XKCD Comic Relif

Link: https://xkcd.com/2077
https://xkcd.com/2077

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