Skip to content

Commit

Permalink
Resolve: MCC-12
Browse files Browse the repository at this point in the history
  • Loading branch information
fbslo committed Feb 18, 2022
1 parent 9a029e2 commit a10db84
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contracts/MasterChef.sol
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ contract MasterChef is Ownable, ReentrancyGuard {
* @param newRewardToken The address of the reward token
*/
constructor(address newPenaltyAddress, uint256 newStartBlock, address newRewardToken) public {
require(newPenaltyAddress != address(0), '!address(0)');
require(newRewardToken != address(0), '!address(0)');

penaltyAddress = newPenaltyAddress;
rewardToken = newRewardToken;

Expand Down Expand Up @@ -664,6 +667,7 @@ contract MasterChef is Ownable, ReentrancyGuard {
* @param _newPenaltyAddress new penalty address
*/
function setPenaltyAddress(address _newPenaltyAddress) external onlyOwner {
require(_newPenaltyAddress != address(0), '!address(0)');
penaltyAddress = _newPenaltyAddress;
emit updatePenaltyAddress(_newPenaltyAddress);
}
Expand Down

0 comments on commit a10db84

Please sign in to comment.