Skip to content

Commit

Permalink
Fix gas-strict-inequalities
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaStebaev committed Aug 27, 2024
1 parent 468d16f commit 490b4cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
20 changes: 11 additions & 9 deletions .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@
"extends": "solhint:all",
"rules": {
"foundry-test-functions": ["off"],
"not-rely-on-time": ["off"],

"compiler-version": ["error","^0.8.0"],
"state-visibility": "error",
"no-empty-blocks": "error",
"avoid-tx-origin": "error",
"check-send-result": "error",
"private-vars-leading-underscore": "error",
"code-complexity": "error",
"visibility-modifier-order": "error",
"compiler-version": ["error","^0.8.0"],
"contract-name-camelcase": "error",
"func-name-mixedcase": "error",
"function-max-lines": "error",
"no-unused-vars": "error",
"gas-strict-inequalities": "error",
"max-states-count": "error",
"no-empty-blocks": "error",
"no-inline-assembly": "error",
"contract-name-camelcase": "error",
"no-unused-vars": "error",
"ordering": "error",
"avoid-tx-origin": "error",
"max-states-count": "error"
"private-vars-leading-underscore": "error",
"state-visibility": "error",
"visibility-modifier-order": "error"
}
}
5 changes: 0 additions & 5 deletions contracts/DateTimeUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ using {
} for Months global;
using {
_timestampLess as <,
_timestampLessOrEqual as <=,
_timestampEqual as ==,
_timestampNotEqual as !=
} for Timestamp global;
Expand All @@ -68,10 +67,6 @@ function _monthsEqual(Months a, Months b) pure returns (bool equal) {
return (Months.unwrap(a) == Months.unwrap(b));
}

function _timestampLessOrEqual(Timestamp left, Timestamp right) pure returns (bool result) {
return Timestamp.unwrap(left) <= Timestamp.unwrap(right);
}

function _timestampLess(Timestamp left, Timestamp right) pure returns (bool result) {
return Timestamp.unwrap(left) < Timestamp.unwrap(right);
}
Expand Down

0 comments on commit 490b4cf

Please sign in to comment.