You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue
In the contract we have multiple require checks to validate contract calls before execution. One of those is checking whether the Commitment that is created does not have a startTime that is in the past
Example
line 180 SinglePlayerCommit.sol require(_startTime > block.timestamp, "SPC::makeCommitment - commitment cannot start in the past");
line 145..149 SinglePlayerCommit.user.sol (test)
_startTime = new Date('1 Jan 2016 12:34:56 GMT').valueOf();
// await expect(
// contractWithUser.makeCommitment(_activity, _measureIndex, _goal, _startTime, _amountToStake, _overrides),
// ).to.be.revertedWith("SPC::makeCommitment - commitment cannot start in the past");
Issue
In the contract we have multiple require checks to validate contract calls before execution. One of those is checking whether the Commitment that is created does not have a
startTime
that is in the pastExample
line 180 SinglePlayerCommit.sol
require(_startTime > block.timestamp, "SPC::makeCommitment - commitment cannot start in the past");
line 145..149 SinglePlayerCommit.user.sol (test)
Reference
https://solidity.readthedocs.io/en/v0.6.10/units-and-global-variables.html?highlight=time#time-units
Expected outcome
startTime
in the past, the call is reverted with the error message declared in the contract.The text was updated successfully, but these errors were encountered: