-
Notifications
You must be signed in to change notification settings - Fork 586
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
docs: complete interface & use inheritdoc #763
docs: complete interface & use inheritdoc #763
Conversation
@kartojal / @miguelmtzinf also noticed that So again ppl relying on this usually completely redefine this interface (at least we do). Might also make sense to apply a similar change there? I'm OOO now, so can't do this. |
…c on DefaultInterestRateStrategy
* @dev Handling MKR and ETH in a different way since they do not have standard `symbol` functions. | ||
* @return The list of reserves, pairs of symbols and addresses | ||
*/ | ||
/// @inheritdoc IPoolDataProvider | ||
function getAllReservesTokens() external view returns (TokenData[] memory) { |
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.
Missing override
on all these functions
I was tempted to do these changes on the Interest Rate contracts back in the days but declined that idea because an asset could have a custom interest rate strategy, and the only one function needed for that is already part of the |
import {IPoolAddressesProvider} from '../../interfaces/IPoolAddressesProvider.sol'; | ||
import {Errors} from '../libraries/helpers/Errors.sol'; | ||
import {IDefaultInterestRateStrategy} from "../../interfaces/IDefaultInterestRateStrategy.sol"; | ||
import {IReserveInterestRateStrategy} from "../../interfaces/IReserveInterestRateStrategy.sol"; |
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.
seems not needed
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.
This is needed for the inherit docs
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.
which function use it? Don't see it tbh
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.
|
||
contract MockReserveInterestRateStrategy is IReserveInterestRateStrategy { | ||
contract MockReserveInterestRateStrategy is IDefaultInterestRateStrategy { |
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.
Would be nice to check if a MockReserveInterestRateStrategy
that only implements IReserveInterestRateStrategy
is enough to satisfy the test suite. if so, I would be in favor of pruning this mock contract.
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.
It is enough (tested it) but I think its ok to leave the full mock, as for what i have seen, all interest rate strategies use all the methods, so could be used for someone
Co-authored-by: miguelmtz <[email protected]>
Co-authored-by: miguelmtz <[email protected]>
Co-authored-by: miguelmtz <[email protected]>
Co-authored-by: miguelmtz <[email protected]>
Co-authored-by: miguelmtz <[email protected]>
Co-authored-by: miguelmtz <[email protected]>
Co-authored-by: miguelmtz <[email protected]>
Co-authored-by: miguelmtz <[email protected]>
Co-authored-by: miguelmtz <[email protected]>
Co-authored-by: miguelmtz <[email protected]>
Co-authored-by: miguelmtz <[email protected]>
Co-authored-by: miguelmtz <[email protected]>
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.
LGTM
Thanks @sakulstra and @sendra !
Merging to an intermediate branch so I can fix the format of some contracts. |
…aProvider (#766) * fix: Complete interfaces of IReserveInterestRateStrategy and IPoolDataProvider (#763) * feat: complete interface & use inheritdoc * Added missing functions on IReserveInterestRateStrategy and inheritdoc on DefaultInterestRateStrategy * fix: added missing overrides, docs for constructor and added ADDRESSES_PROVIDER to interface * fix: sepparated interest rate strategy interface into default and rate interfaces * fix: added visibility to false rule * fix: minor fixes * fix: fixed natspec. Fixed import order * Update contracts/interfaces/IDefaultInterestRateStrategy.sol * Apply suggestions from code review * Apply suggestions from code review * fix: fixed correct import order Co-authored-by: eboado <[email protected]> Co-authored-by: sendra <[email protected]> Co-authored-by: sendra <[email protected]> Co-authored-by: miguelmtz <[email protected]> * fix: Fix format of multiple contracts Co-authored-by: Lukas <[email protected]> Co-authored-by: eboado <[email protected]> Co-authored-by: sendra <[email protected]> Co-authored-by: sendra <[email protected]>
moving structs & docs to the interface so it's easier to consume