Disable solhint about relying on timestamp
This commit is contained in:
parent
78eaaa7812
commit
07d0e33789
|
@ -2,6 +2,7 @@
|
|||
"extends": "solhint:recommended",
|
||||
"rules": {
|
||||
"compiler-version": ["warn", "^0.8.0"],
|
||||
"func-visibility": ["warn", {"ignoreConstructors": true}]
|
||||
"func-visibility": ["warn", {"ignoreConstructors": true}],
|
||||
"not-rely-on-time": "off"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,6 @@ contract AccountLocks {
|
|||
}
|
||||
|
||||
function isInactive(Lock storage lock) private view returns (bool) {
|
||||
// solhint-disable-next-line not-rely-on-time
|
||||
return lock.unlocked || lock.expiry <= block.timestamp;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,6 @@ contract Marketplace is Collateral {
|
|||
|
||||
Request storage request = requests[offer.requestId];
|
||||
require(request.client != address(0), "Unknown request");
|
||||
// solhint-disable-next-line not-rely-on-time
|
||||
require(request.expiry > block.timestamp, "Request expired");
|
||||
|
||||
require(offer.price <= request.maxPrice, "Price too high");
|
||||
|
@ -62,7 +61,6 @@ contract Marketplace is Collateral {
|
|||
function selectOffer(bytes32 id) public marketplaceInvariant {
|
||||
Offer storage offer = offers[id];
|
||||
require(offer.host != address(0), "Unknown offer");
|
||||
// solhint-disable-next-line not-rely-on-time
|
||||
require(offer.expiry > block.timestamp, "Offer expired");
|
||||
|
||||
Request storage request = requests[offer.requestId];
|
||||
|
|
Loading…
Reference in New Issue