Draft
Conversation
mpetrunic
reviewed
Apr 14, 2026
mpetrunic
requested changes
Apr 15, 2026
Member
mpetrunic
left a comment
There was a problem hiding this comment.
you still need to remove all lint errors
| bytes calldata signature | ||
| ) external; | ||
|
|
||
| function borrowManyDirect(address[] calldata borrowTokens, uint256[] calldata amounts) external; |
Member
There was a problem hiding this comment.
I feel like this is pointless. Calling contract can just call borrowDirect multiple times
Comment on lines
+473
to
+475
| // If borrowing directly we don't allow native as the caller | ||
| // will take care of pulling funds and unwrapping eventual | ||
| // wrapped tokens. |
Member
There was a problem hiding this comment.
but why do we care? if we already have logic, might as well leave it to avoid ifs
| /// targetCallData is a trusted and checked calldata. | ||
| /// @param borrowToken can be specified as native token address which is 0x0. In this case, the function will | ||
| /// borrow wrapped native token, then unwrap it and include the native value in the target call. | ||
| function borrow( |
Member
There was a problem hiding this comment.
why are you changing this function?
| whenBorrowNotPaused | ||
| onlyDirectBorrower | ||
| { | ||
| _borrow(borrowToken, amount, _msgSender(), msg.data[0:0], true); |
Member
There was a problem hiding this comment.
Suggested change
| _borrow(borrowToken, amount, _msgSender(), msg.data[0:0], true); | |
| amount = _processBorrowAmount(amount, msg.data[0:0]); | |
| (uint256 nativeValue, address actualBorrowToken, bytes memory context) = | |
| _borrow(borrowToken, amount, _msgSender(), false, ""); | |
| _afterBorrowLogic(actualBorrowToken, context); | |
| // store borrowed amount in mapping |
Member
There was a problem hiding this comment.
not sure why are you modifying so much. The only diff is that we don't validate signature and don't call finalizeBorrow which calls target.
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.
Solves #187