You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function setMinterManager does not verify if the input parameter _newMinterManager implements MinterManagementInterface now. So the variable minterManager maybe set to the wrong value by accident.
function setMinterManager(address_newMinterManager) public onlyOwner {
emitMinterManagerSet(address(minterManager), _newMinterManager);
minterManager =MinterManagementInterface(_newMinterManager);
}
I suggest the following new codes:
function setMinterManager(address_newMinterManager) public onlyOwner {
require(
!MinterManagementInterface(_newMinterManager).isMinter(address(0)),
"invalid minter mangaer"
);
emitMinterManagerSet(address(minterManager), _newMinterManager);
minterManager =MinterManagementInterface(_newMinterManager);
}
Or check it by ERC-165.
The text was updated successfully, but these errors were encountered:
gzliudan
changed the title
Bug: function setMinterManager not verify the input parameter _newMinterManager
Suggest: function setMinterManager verify the input parameter
Apr 15, 2024
gzliudan
changed the title
Suggest: function setMinterManager verify the input parameter
function setMinterManager should verify the input parameter
Apr 15, 2024
gzliudan
changed the title
function setMinterManager should verify the input parameter
function setMinterManager should verify the input
Apr 15, 2024
The function
setMinterManager
does not verify if the input parameter_newMinterManager
implementsMinterManagementInterface
now. So the variableminterManager
maybe set to the wrong value by accident.I suggest the following new codes:
Or check it by ERC-165.
The text was updated successfully, but these errors were encountered: