Skip to content

Commit

Permalink
fix: SRS-03 check the address(0) for comptroller address in swapRoute…
Browse files Browse the repository at this point in the history
…r constructor
  • Loading branch information
Debugger022 committed May 9, 2023
1 parent 774eed1 commit 48eb87c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contracts/Swap/SwapRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ contract SwapRouter is Ownable2Step, RouterHelper, IPancakeSwapV2Router {
/// @notice Constructor for the implementation contract. Sets immutable variables.
/// @custom:oz-upgrades-unsafe-allow constructor
constructor(address WBNB_, address factory_, address _comptrollerAddress) RouterHelper(WBNB_, factory_) {
if (_comptrollerAddress == address(0)) {
revert ZeroAddress();
}
comptrollerAddress = _comptrollerAddress;
}

Expand Down

0 comments on commit 48eb87c

Please sign in to comment.