Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M-03 [Oval] Newest Prices May Be Reported Ignoring the lockWindow() Constraint #17

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/controllers/ImmutableController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ abstract contract ImmutableController is Oval {
mapping(address => bool) public unlockers;

constructor(uint256 _lockWindow, uint256 _maxTraversal, address[] memory _unlockers, uint256 _maxAge) {
require(_maxAge > _lockWindow, "Max age not above lock window");
require(_maxTraversal > 0, "Max traversal must be > 0");

LOCK_WINDOW = _lockWindow;
MAX_TRAVERSAL = _maxTraversal;
MAX_AGE = _maxAge;
Expand Down
3 changes: 3 additions & 0 deletions src/controllers/MutableUnlockersController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ abstract contract MutableUnlockersController is Ownable, Oval {
mapping(address => bool) public unlockers;

constructor(uint256 _lockWindow, uint256 _maxTraversal, address[] memory _unlockers, uint256 _maxAge) {
require(_maxAge > _lockWindow, "Max age not above lock window");
require(_maxTraversal > 0, "Max traversal must be > 0");

LOCK_WINDOW = _lockWindow;
MAX_TRAVERSAL = _maxTraversal;
MAX_AGE = _maxAge;
Expand Down
2 changes: 2 additions & 0 deletions src/factories/BaseFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ contract BaseFactory is Ownable {
);

constructor(uint256 _maxTraversal, address[] memory _defaultUnlockers) {
require(_maxTraversal > 0, "Max traversal must be > 0");

MAX_TRAVERSAL = _maxTraversal;
setDefaultUnlockers(_defaultUnlockers);
}
Expand Down
Loading