diff --git a/contracts/LaunchEvent.sol b/contracts/LaunchEvent.sol index 38ffeda7..8872eecf 100644 --- a/contracts/LaunchEvent.sol +++ b/contracts/LaunchEvent.sol @@ -267,6 +267,10 @@ contract LaunchEvent { _maxAllocation > 0, "LaunchEvent: max allocation must not be zero" ); + require( + _tokenIncentivesPercent < 1 ether, + "LaunchEvent: token incentives too high" + ); issuer = _issuer; diff --git a/test/LaunchEvent.test.js b/test/LaunchEvent.test.js index 9a5f6729..d04dd189 100644 --- a/test/LaunchEvent.test.js +++ b/test/LaunchEvent.test.js @@ -179,6 +179,18 @@ describe("launch event contract initialisation", function () { ); }); + it("should revert if incentives percent too high", async function () { + const args = { + ...this.validParams, + _tokenIncentivesPercent: ethers.utils.parseEther("1"), + }; + await testReverts( + this.RocketFactory, + args, + "LaunchEvent: token incentives too high" + ); + }); + it("should revert if startime has elapsed", async function () { const args = { ...this.validParams,