-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add Pool Access Control methods #27
Conversation
@@ -1,6 +1,7 @@ | |||
{ | |||
"extends": "solhint:recommended", | |||
"rules": { | |||
"compiler-version": ["error", "^0.8.16"] | |||
"compiler-version": ["error", "^0.8.16"], | |||
"func-visibility": ["warn", { "ignoreConstructors": true }] |
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 recommended to be set to true
for solidity >= 0.7.0
@@ -321,6 +320,7 @@ contract Pool is IPool, ERC20 { | |||
*/ | |||
function deposit(uint256 assets, address receiver) | |||
external | |||
virtual |
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.
Do we need to cover off on the mint
as well?
I also notice per the EIP 4626 re: maxMint
, maxDeposit
: MUST factor in both global and user-specific limits
, which I interpret to mean incorporating ACL policies? Not sure how we want to handle that (can also punt).
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.
👍
} | ||
|
||
/** | ||
* @inheritdoc Pool |
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.
Nice 👍 I also even like the shorthand /// @inheritdoc
style too.
* @dev Modifier that checks that the caller is the pool's manager. | ||
*/ | ||
modifier onlyManagerOfPool() { | ||
require(msg.sender == _pool.manager(), "Pool: caller is not manager"); |
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.
Nice, was wondering how we'd handle the case of a pool switching manager's, and needing to update this contract, but this makes sense to just store the pool address 👍
This PR does a few things:
ServiceConfigurable
, as it was causing issues with inheritance. For now, these methods will be explicitly declared in each contract.