-
Notifications
You must be signed in to change notification settings - Fork 366
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
#252: add null address check #247
#252: add null address check #247
Conversation
added comment for require
contracts/minting/MintController.sol
Outdated
@@ -58,6 +58,7 @@ contract MintController is Controller { | |||
* @dev sets the minterManager | |||
*/ | |||
function setMinterManager(address _newMinterManager) onlyOwner public returns (bool) { | |||
require(_newMinterManager != address(0), "Minter manager must be a non-zero address"); |
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.
I'm not sure this feature is a good idea. We may want to be able to disable the MasterMinter contract (in case of an emergency). We have several options:
- Change the USDC masterMinter to point to a different contract
- Set the MasterMinter minterManager to some random address - of which 0 is the cleanest.
We should discuss this with the team.
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.
Remove null address check for setMintManager
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.
Summary:
- We need to discuss whether to allow
minterManager
to equal 0 - Use
expectError
instead ofexpectRevert
to check error messages - If we decide to require(minterManager != 0) we will need to delete all unit tests that check what happens what it is 0.
No description provided.