diff --git a/contracts/Gauge.sol b/contracts/Gauge.sol index 4212e59..d9d315b 100644 --- a/contracts/Gauge.sol +++ b/contracts/Gauge.sol @@ -107,9 +107,10 @@ contract Gauge is BaseGauge, IGauge { ); } - function setVe(address _ve) external onlyOwner { - veToken = _ve; - emit UpdatedVeToken(_ve); + function setVe(address _veToken) external onlyOwner { + require(address(_veToken) != address(0x0), "_veToken 0x0 address"); + veToken = _veToken; + emit UpdatedVeToken(_veToken); } /** @return total of the staked vault token diff --git a/contracts/VeYfiRewards.sol b/contracts/VeYfiRewards.sol index 895740c..294b777 100644 --- a/contracts/VeYfiRewards.sol +++ b/contracts/VeYfiRewards.sol @@ -23,12 +23,14 @@ contract VeYfiRewards is BaseGauge { address _owner ) { __initialize(_rewardToken, _owner); + require(address(_veToken) != address(0x0), "_veToken 0x0 address"); veToken = _veToken; } - function setVe(address _ve) external onlyOwner { - veToken = _ve; - emit UpdatedVeToken(_ve); + function setVe(address _veToken) external onlyOwner { + require(address(_veToken) != address(0x0), "_veToken 0x0 address"); + veToken = _veToken; + emit UpdatedVeToken(_veToken); } function _updateReward(address account) internal override {