Skip to content

Commit

Permalink
add zero address check
Browse files Browse the repository at this point in the history
  • Loading branch information
ZumZoom committed Mar 29, 2022
1 parent f41b029 commit 5b97ae7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contracts/FarmingPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ contract FarmingPool is IFarmingPool, Ownable, ERC20 {
string(abi.encodePacked("farm", stakingToken_.symbol()))
)
{
require(address(stakingToken_) != address(0), "FP: stakingToken is zero");
require(address(rewardsToken_) != address(0), "FP: rewardsToken is zero");
stakingToken = stakingToken_;
rewardsToken = rewardsToken_;
}
Expand Down

0 comments on commit 5b97ae7

Please sign in to comment.