Added endpoints with default values#97
Conversation
| /// @notice Deposit a given amount of underlying asset into the vault. | ||
| /// @param assets The amount of underlying asset to deposit. The caller must have approved this contract to spend this amount. | ||
| /// @return The amount of shares minted. | ||
| function deposit(uint256 assets) external returns (uint256) { |
There was a problem hiding this comment.
Maybe add underscore before the arguments of the functions
There was a problem hiding this comment.
It's not the convention used this implementation, as it inherits OZ's conventions... So I don't think it's welcomed here
There was a problem hiding this comment.
Ok np, it's just that there is one in the functions above
a39b5d9 to
2db0fa4
Compare
MathisGD
left a comment
There was a problem hiding this comment.
I think that it should be tested quickly.
MerlinEgalite
left a comment
There was a problem hiding this comment.
I'm not sure it's worth it. These functions will only be used by our frontend as every other protocol will use the ERC-4626 interface (else why bother with a standard?). This PR also increases the attack surface and the likelihood to make mistakes later in the future. What do you think @morpho-dao/solidity ?
Adding external functions is not enough to increase the attack surface: here for example, we add external functions without adding features; we're only constraining the usage of the more generic entrypoint to a safe scenario - from the point of view of any caller (background focus being that when calling such a function, a caller always has access to their funds afterwards) Otherwise, I agree with the other point I support this change as an integrator (on & off-chain, it's just easier and trustless to call |
|
Dropping this |
Pull Request
Keep in mind that doing so has an advantage and an inconvenient (I do support the change):
deposit(uint256,address)instead ofdeposit)The latter is of no importance to me, as the integrator that I may be