-
Notifications
You must be signed in to change notification settings - Fork 40
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
[DRAFT] Retirement batches #79
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This reverts commit 0c66d5c.
|
||
AppStorage internal s; | ||
|
||
/** Handles non reentrance for single retirement transactions */ | ||
modifier nonReentrant() { |
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.
@brendan Reentrency guard only on the batchRetire function?
(bool success, bytes memory data) = diamondAddress.delegatecall(calls[i].callData); | ||
|
||
// Extract the call result | ||
if (success && data.length == 32) { |
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.
if we want to fully abstract this batchCall we should remove the data length success condition for any void functions or return types like other bytes/strings etc. In that case we could just return raw bytes and decode offchain based on the function called.
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.
Done in f531024
I did a bit of refactoring. Since we return whole bytes. I also send the success boolean in the event and in the function return value.
BatchRetireFacet
that enables doing multiple retirements in one transaction. With tests.Diamond
. With tests.ReentrancyGuard
to support batchingupgradeCurrentDiamond
method to support the BatchRetireFacetgetSourceTokensWithSlippage
helper methodadjustedAmountOut
inLibSwap
IQuoterView.sol
interface and updates referencesfoundry
version in theREADME