From cb4e5aef9b22cb278b8da39e5419eed2b6d6714b Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Wed, 30 Oct 2024 08:04:06 +1300 Subject: [PATCH] Linting --- .solhint.json | 2 ++ contracts/mocks/CallReceiverMock.sol | 2 +- contracts/mocks/ERC165CheckerMock.sol | 4 ++-- contracts/modules/utils/MultiCallUtils.sol | 1 + contracts/utils/LibClone.sol | 4 ++-- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.solhint.json b/.solhint.json index 61df3207..3cfca354 100644 --- a/.solhint.json +++ b/.solhint.json @@ -14,6 +14,8 @@ "func-order": "off", "imports-on-top": "off", "ordering": "off", + "no-empty-blocks": "off", + "avoid-low-level-calls": "off", "no-global-import": "off", "no-unused-vars": "error", "not-rely-on-time": "off", diff --git a/contracts/mocks/CallReceiverMock.sol b/contracts/mocks/CallReceiverMock.sol index c3ca5d48..78682a0b 100644 --- a/contracts/mocks/CallReceiverMock.sol +++ b/contracts/mocks/CallReceiverMock.sol @@ -6,7 +6,7 @@ contract CallReceiverMock { uint256 public lastValA; bytes public lastValB; - bool revertFlag; + bool private revertFlag; constructor() payable { } diff --git a/contracts/mocks/ERC165CheckerMock.sol b/contracts/mocks/ERC165CheckerMock.sol index f8e19958..cb2d8f27 100644 --- a/contracts/mocks/ERC165CheckerMock.sol +++ b/contracts/mocks/ERC165CheckerMock.sol @@ -3,8 +3,8 @@ pragma solidity 0.8.19; contract ERC165CheckerMock { - bytes4 constant InvalidID = 0xffffffff; - bytes4 constant ERC165ID = 0x01ffc9a7; + bytes4 private constant InvalidID = 0xffffffff; + bytes4 public constant ERC165ID = 0x01ffc9a7; function doesContractImplementInterface(address _contract, bytes4 _interfaceId) external view returns (bool) { uint256 success; diff --git a/contracts/modules/utils/MultiCallUtils.sol b/contracts/modules/utils/MultiCallUtils.sol index 5e11dd0d..65f116f5 100644 --- a/contracts/modules/utils/MultiCallUtils.sol +++ b/contracts/modules/utils/MultiCallUtils.sol @@ -76,6 +76,7 @@ contract MultiCallUtils { } function callOrigin() external view returns (address) { + // solhint-disable-next-line avoid-tx-origin return tx.origin; } diff --git a/contracts/utils/LibClone.sol b/contracts/utils/LibClone.sol index 3b19d8f0..361ec3ee 100644 --- a/contracts/utils/LibClone.sol +++ b/contracts/utils/LibClone.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.4; +pragma solidity 0.8.19; /// @notice Minimal proxy library. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol) @@ -199,4 +199,4 @@ library LibClone { mstore(0x35, 0) // Restore the overwritten part of the free memory pointer. } } -} \ No newline at end of file +}