-
Notifications
You must be signed in to change notification settings - Fork 49
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
feat: "withdraw" callable by any account, removes "to" from "withdrawMultiple" #785
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feedback below.
Note: I have already made the changes locally on my machine, if we agree on them I can push them here, just lmk.
test/integration/concrete/lockup/withdraw-multiple/withdrawMultiple.tree
Show resolved
Hide resolved
@andreivladbrg I have added my replies to your comments.
OK after we resolve all the above comments. |
@smol-ninja i have pushed the commit to address the findings can you confirm that i have not missed anything? and ofc, if you don't agree with something to say |
05f08ef
to
9239c5d
Compare
05f08ef
to
8ac610d
Compare
Just wanted to comment to say that I want to review this before merging. I will do it next week. |
@PaulRBerg any update? |
Apologies. I will try to review during the weekend. |
6bc1db5
to
ca8bfdb
Compare
feat: `withdrawMultiple` calls withdraw on streams recipient test: fuzz test for with when the caller is an unknown address refactor: rename custom error chore: improve explanatory comments test: undo authorized test branches test: say uknown address instead of public caller test: make withdraw fuzz test more minimalist
b0b73a0
to
3dd0cd5
Compare
refactor: reorder errors test: improve names for functions and variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reviewed this PR and it generally looks good to me. Thanks for the detailed summary in the OP, @smol-ninja! Super helpful.
The only change I would like to see made is the one about refactoring the withdraw
tree to include new modifiers:
givenWithdrawalAddressIsRecipient
givenWithdrawalAddressNotRecipient
Thanks @PaulRBerg for giving your feedback. I have pushed the changes. Please have a look and let me know if there is anything else you'd like to change. |
test: polish withdraw tree and tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @smol-ninja. I have pushed a few revisions. Let me know if they look good to you.
Thanks for those changes @PaulRBerg. It looks more organized now. @andreivladbrg please let me know if you approve of these changes as well. |
* feat: `withdraw` function callable by any account feat: `withdrawMultiple` calls withdraw on streams recipient test: fuzz test for with when the caller is an unknown address refactor: rename custom error chore: improve explanatory comments test: undo authorized test branches test: say uknown address instead of public caller test: make withdraw fuzz test more minimalist * refactor: withdraw related notes (#791) * docs: improve writing in NatSpec comments refactor: reorder errors test: improve names for functions and variables * refactor: withdraw tree * refactor: order of checks in "withdraw" test: polish withdraw tree and tests --------- Co-authored-by: Paul Razvan Berg <[email protected]>
* feat: `withdraw` function callable by any account feat: `withdrawMultiple` calls withdraw on streams recipient test: fuzz test for with when the caller is an unknown address refactor: rename custom error chore: improve explanatory comments test: undo authorized test branches test: say uknown address instead of public caller test: make withdraw fuzz test more minimalist * refactor: withdraw related notes (#791) * docs: improve writing in NatSpec comments refactor: reorder errors test: improve names for functions and variables * refactor: withdraw tree * refactor: order of checks in "withdraw" test: polish withdraw tree and tests --------- Co-authored-by: Paul Razvan Berg <[email protected]>
* feat: `withdraw` function callable by any account feat: `withdrawMultiple` calls withdraw on streams recipient test: fuzz test for with when the caller is an unknown address refactor: rename custom error chore: improve explanatory comments test: undo authorized test branches test: say uknown address instead of public caller test: make withdraw fuzz test more minimalist * refactor: withdraw related notes (#791) * docs: improve writing in NatSpec comments refactor: reorder errors test: improve names for functions and variables * refactor: withdraw tree * refactor: order of checks in "withdraw" test: polish withdraw tree and tests --------- Co-authored-by: Paul Razvan Berg <[email protected]>
* feat: `withdraw` function callable by any account feat: `withdrawMultiple` calls withdraw on streams recipient test: fuzz test for with when the caller is an unknown address refactor: rename custom error chore: improve explanatory comments test: undo authorized test branches test: say uknown address instead of public caller test: make withdraw fuzz test more minimalist * refactor: withdraw related notes (#791) * docs: improve writing in NatSpec comments refactor: reorder errors test: improve names for functions and variables * refactor: withdraw tree * refactor: order of checks in "withdraw" test: polish withdraw tree and tests --------- Co-authored-by: Paul Razvan Berg <[email protected]>
* feat: `withdraw` function callable by any account feat: `withdrawMultiple` calls withdraw on streams recipient test: fuzz test for with when the caller is an unknown address refactor: rename custom error chore: improve explanatory comments test: undo authorized test branches test: say uknown address instead of public caller test: make withdraw fuzz test more minimalist * refactor: withdraw related notes (#791) * docs: improve writing in NatSpec comments refactor: reorder errors test: improve names for functions and variables * refactor: withdraw tree * refactor: order of checks in "withdraw" test: polish withdraw tree and tests --------- Co-authored-by: Paul Razvan Berg <[email protected]>
Closes #731 and #774.
This PR introduces the following changes.
New terminologies
Changes to
withdraw
featurewithdraw
to recipient address but only the stream's owner or an approved third party is allowed withdraw to any address.SablierV2Lockup_WithdrawalAddressNotRecipient
and removesSablierV2Lockup_InvalidSenderWithdrawal
.to
as recipient.withdraw.t.sol
.Changes to
withdrawMultiple
featurewithdrawMultiple
now requiresstreamIds
andamounts
as input and automatically calls withdraw on each stream ID's recipient address.