Skip to content

Commit

Permalink
gas optimisation calling require before on createRJLaunchEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisMeMyself authored and cryptofish7 committed Jan 31, 2022
1 parent dc7cc83 commit c33e2fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions contracts/RocketJoeFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,17 @@ contract RocketJoeFactory is
uint256 _userTimelock,
uint256 _issuerTimelock
) external override returns (address) {
require(
getRJLaunchEvent[_token] == address(0),
"RJFactory: token has already been issued"
);
require(_issuer != address(0), "RJFactory: issuer can't be 0 address");
require(_token != address(0), "RJFactory: token can't be 0 address");
require(_token != wavax, "RJFactory: token can't be wavax");
require(
_tokenAmountIncludingIncentives > 0,
"RJFactory: token amount including incentives needs to be greater than 0"
);
require(
getRJLaunchEvent[_token] == address(0),
"RJFactory: token has already been issued"
);
require(
IJoeFactory(factory).getPair(_token, wavax) == address(0) ||
IJoePair(IJoeFactory(factory).getPair(_token, wavax))
Expand Down

0 comments on commit c33e2fc

Please sign in to comment.