diff --git a/packages/zevm-app-contracts/contracts/instant-rewards/InstantRewardsFactory.sol b/packages/zevm-app-contracts/contracts/instant-rewards/InstantRewardsFactory.sol index 0c69f89..3a0560f 100644 --- a/packages/zevm-app-contracts/contracts/instant-rewards/InstantRewardsFactory.sol +++ b/packages/zevm-app-contracts/contracts/instant-rewards/InstantRewardsFactory.sol @@ -8,6 +8,11 @@ contract InstantRewardsFactory is Ownable2Step { bool public allowPublicCreation = false; error AccessDenied(); + error InvalidSignerAddress(); + error EmptyName(); + error StartTimeInPast(); + error EndTimeBeforeStart(); + event InstantRewardsCreated(address indexed instantRewards, address indexed owner); constructor(address owner) Ownable() { @@ -24,6 +29,11 @@ contract InstantRewardsFactory is Ownable2Step { uint256 end, string memory name ) external returns (address) { + if (signerAddress == address(0)) revert InvalidSignerAddress(); + if (bytes(name).length == 0) revert EmptyName(); + if (start < block.timestamp) revert StartTimeInPast(); + if (end <= start) revert EndTimeBeforeStart(); + bool isOwner = owner() == msg.sender; if (!allowPublicCreation && !isOwner) revert AccessDenied();