Skip to content

Commit

Permalink
disallow timeout greater than 365 days
Browse files Browse the repository at this point in the history
  • Loading branch information
auryn-macmillan committed Dec 8, 2022
1 parent 38599a3 commit a82911c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions contracts/RealityModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,6 @@ abstract contract RealityModule is Module {
__Ownable_init();
require(_avatar != address(0), "Avatar can not be zero address");
require(_target != address(0), "Target can not be zero address");
require(timeout > 0, "Timeout has to be greater 0");
require(
expiration == 0 || expiration - cooldown >= 60,
"There need to be at least 60s between end of cooldown and expiration"
);
setAvatar(_avatar);
setTarget(_target);
setOracle(_oracle);
Expand Down Expand Up @@ -155,6 +150,7 @@ abstract contract RealityModule is Module {
/// @notice Timeout must be greater than `0`
function setQuestionTimeout(uint32 timeout) public onlyOwner {
require(timeout > 0, "Timeout has to be greater 0");
require(timeout < 365 days, "timeout must be less than 365 days");
questionTimeout = timeout;
emit SetQuestionTimeout(timeout);
}
Expand Down

0 comments on commit a82911c

Please sign in to comment.