Repository navigation
feat: add recipient param to PoolManager.burn - #1045
Open
BhariGowda wants to merge 3 commits into
Open
BhariGowda wants to merge 3 commits into
BhariGowda wants to merge 3 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PoolManager.burn()always credits the positive delta tomsg.sender.There is no way to direct the credit to a different address without a
multi-step workaround (burn → take → transfer), costing extra gas and
adding unnecessary complexity for router/hook integrators.
Fixes #985
Solution
Add a new 4-argument overload:
The positive delta is credited to
recipientinstead ofmsg.sender.If
recipientisaddress(0), it defaults tomsg.senderfor safety.The existing 3-argument
burn()is unchanged — fully backwards compatible.Changes
src/interfaces/IPoolManager.sol— new overload in interfacesrc/PoolManager.sol— new overload implementationsrc/test/ProxyPoolManager.sol— new overload in proxyTests
603 tests pass. The 1 failure is a pre-existing
TickMathedge caseunrelated to this change (present on
mainbefore any modifications).