-
Notifications
You must be signed in to change notification settings - Fork 29
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: add repay method #14
Conversation
@@ -201,11 +201,23 @@ contract ProtocolV3TestBase is Test { | |||
IPool pool, | |||
uint256 amount, | |||
bool stable | |||
) internal { | |||
) external { |
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.
made it external as otherwise we cannot try catch it and check specific errors
console.log('BORROW: %s, Amount %s, Stable: %s', config.symbol, amount, stable); | ||
pool.borrow(config.underlying, amount, stable ? 1 : 2, 0, address(this)); | ||
} | ||
|
||
function _repay( |
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.
wdyt, in most current helpers we require the user to have funds before and provide a flag for approval
I don't see where this is useful as we are not testing the protocol, so having funds and approval could be implicit.
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.
yup I fully agree with this. having funds and approved should be defaulted on the method.
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.
Yes, on previous helpers I made, some stuff was clearly useless
No description provided.