diff --git a/markets/legacy-market/contracts/LegacyMarket.sol b/markets/legacy-market/contracts/LegacyMarket.sol index faf9689fe6..f52334c5f8 100644 --- a/markets/legacy-market/contracts/LegacyMarket.sol +++ b/markets/legacy-market/contracts/LegacyMarket.sol @@ -28,7 +28,7 @@ contract LegacyMarket is ILegacyMarket, Ownable, UUPSImplementation, IMarket { bool public pauseMigration; // used by _migrate to temporarily set reportedDebt to another value before - uint256 tmpLockedDebt; + uint256 internal tmpLockedDebt; IAddressResolver public v2xResolver; IV3CoreProxy public v3System; @@ -38,6 +38,7 @@ contract LegacyMarket is ILegacyMarket, Ownable, UUPSImplementation, IMarket { error InsufficientCollateralMigrated(uint256 amountRequested, uint256 amountAvailable); error Paused(); + // solhint-disable-next-line no-empty-blocks constructor() Ownable(msg.sender) {} /** diff --git a/markets/perps-market/contracts/interfaces/external/ISpotMarketSystem.sol b/markets/perps-market/contracts/interfaces/external/ISpotMarketSystem.sol index 882c8447b2..6f0589a6ce 100644 --- a/markets/perps-market/contracts/interfaces/external/ISpotMarketSystem.sol +++ b/markets/perps-market/contracts/interfaces/external/ISpotMarketSystem.sol @@ -4,4 +4,7 @@ pragma solidity >=0.8.11 <0.9.0; import {IAtomicOrderModule} from "@synthetixio/spot-market/contracts/interfaces/IAtomicOrderModule.sol"; import {ISpotMarketFactoryModule} from "@synthetixio/spot-market/contracts/interfaces/ISpotMarketFactoryModule.sol"; -interface ISpotMarketSystem is IAtomicOrderModule, ISpotMarketFactoryModule {} +// solhint-disable-next-line no-empty-blocks +interface ISpotMarketSystem is IAtomicOrderModule, ISpotMarketFactoryModule { + +} diff --git a/markets/perps-market/contracts/interfaces/external/ISynthetixSystem.sol b/markets/perps-market/contracts/interfaces/external/ISynthetixSystem.sol index 7812baf4c9..dbb26c9219 100644 --- a/markets/perps-market/contracts/interfaces/external/ISynthetixSystem.sol +++ b/markets/perps-market/contracts/interfaces/external/ISynthetixSystem.sol @@ -5,4 +5,7 @@ import {IAssociatedSystemsModule} from "@synthetixio/core-modules/contracts/inte import {IMarketManagerModule} from "@synthetixio/main/contracts/interfaces/IMarketManagerModule.sol"; import {IUtilsModule} from "@synthetixio/main/contracts/interfaces/IUtilsModule.sol"; -interface ISynthetixSystem is IAssociatedSystemsModule, IMarketManagerModule, IUtilsModule {} +// solhint-disable-next-line no-empty-blocks +interface ISynthetixSystem is IAssociatedSystemsModule, IMarketManagerModule, IUtilsModule { + +} diff --git a/markets/perps-market/contracts/mocks/MockPyth.sol b/markets/perps-market/contracts/mocks/MockPyth.sol index 1beb560d01..fcd59c605a 100644 --- a/markets/perps-market/contracts/mocks/MockPyth.sol +++ b/markets/perps-market/contracts/mocks/MockPyth.sol @@ -7,10 +7,11 @@ import {MockPyth as BaseMockPyth} from "@synthetixio/oracle-manager/contracts/mo * @title Module for connecting to other systems. * See oracle-manager/../MockPyth */ -// solhint-disable-next-line no-empty-blocks contract MockPyth is BaseMockPyth { + // solhint-disable no-empty-blocks constructor( uint _validTimePeriod, uint _singleUpdateFeeInWei ) BaseMockPyth(_validTimePeriod, _singleUpdateFeeInWei) {} + // solhint-enable no-empty-blocks } diff --git a/markets/spot-market/contracts/interfaces/external/ISynthetixSystem.sol b/markets/spot-market/contracts/interfaces/external/ISynthetixSystem.sol index d069d439dd..a833bccd92 100644 --- a/markets/spot-market/contracts/interfaces/external/ISynthetixSystem.sol +++ b/markets/spot-market/contracts/interfaces/external/ISynthetixSystem.sol @@ -6,9 +6,13 @@ import "@synthetixio/main/contracts/interfaces/IMarketManagerModule.sol"; import "@synthetixio/main/contracts/interfaces/IMarketCollateralModule.sol"; import "@synthetixio/main/contracts/interfaces/IUtilsModule.sol"; +// solhint-disable no-empty-blocks interface ISynthetixSystem is IAssociatedSystemsModule, IMarketCollateralModule, IMarketManagerModule, IUtilsModule -{} +{ + +} +// solhint-enable no-empty-blocks diff --git a/markets/spot-market/contracts/mocks/FeeCollectorMock.sol b/markets/spot-market/contracts/mocks/FeeCollectorMock.sol index 2d6b5409eb..43bbcb159d 100644 --- a/markets/spot-market/contracts/mocks/FeeCollectorMock.sol +++ b/markets/spot-market/contracts/mocks/FeeCollectorMock.sol @@ -17,6 +17,11 @@ contract FeeCollectorMock is IFeeCollector { address sender, uint8 tradeType ) external override returns (uint256) { + // mention the variables in the block to prevent unused local variable warning + marketId; + sender; + tradeType; + uint256 feeToCollect = feeAmount / 2; return feeToCollect; } diff --git a/markets/spot-market/contracts/mocks/OracleVerifierMock.sol b/markets/spot-market/contracts/mocks/OracleVerifierMock.sol index fb61d67980..38b8cfe4a2 100644 --- a/markets/spot-market/contracts/mocks/OracleVerifierMock.sol +++ b/markets/spot-market/contracts/mocks/OracleVerifierMock.sol @@ -18,6 +18,10 @@ contract OracleVerifierMock is IPythVerifier, IChainlinkVerifier { uint64 minPublishTime, uint64 maxPublishTime ) external payable override returns (IPythVerifier.PriceFeed[] memory priceFeeds) { + // mention the variables in the block to prevent unused local variable warning + updateData; + maxPublishTime; + priceFeeds = new IPythVerifier.PriceFeed[](1); priceFeeds[0] = IPythVerifier.PriceFeed({ @@ -41,12 +45,16 @@ contract OracleVerifierMock is IPythVerifier, IChainlinkVerifier { function verify( bytes memory chainlinkBlob ) external view override returns (bytes memory verifierResponse) { + // mention the variables in the block to prevent unused local variable warning + chainlinkBlob; // solhint-disable-next-line numcast/safe-cast int192 priceFormatted = int192(price) * 10 ** 18; verifierResponse = abi.encode("ETH-USD", block.timestamp, 10, priceFormatted); } function getUpdateFee(uint256 updateDataSize) external view override returns (uint256) { + // mention the variables in the block to prevent unused local variable warning + updateDataSize; return 1; } } diff --git a/protocol/governance/contracts/modules/council-nft/CouncilTokenModule.sol b/protocol/governance/contracts/modules/council-nft/CouncilTokenModule.sol index bb2be96cb7..ed44af74ab 100644 --- a/protocol/governance/contracts/modules/council-nft/CouncilTokenModule.sol +++ b/protocol/governance/contracts/modules/council-nft/CouncilTokenModule.sol @@ -10,6 +10,7 @@ import "@synthetixio/core-contracts/contracts/utils/SafeCast.sol"; * @title Module with custom NFT logic for the account token. * @dev See IAccountTokenModule. */ +// solhint-disable-next-line no-empty-blocks contract CouncilTokenModule is ICouncilTokenModule, NftModule { } diff --git a/protocol/governance/contracts/submodules/election/ElectionCredentials.sol b/protocol/governance/contracts/submodules/election/ElectionCredentials.sol index 796fccb297..955002cb36 100644 --- a/protocol/governance/contracts/submodules/election/ElectionCredentials.sol +++ b/protocol/governance/contracts/submodules/election/ElectionCredentials.sol @@ -14,7 +14,7 @@ contract ElectionCredentials is ElectionBase { using Council for Council.Data; using AssociatedSystem for AssociatedSystem.Data; - bytes32 constant _COUNCIL_NFT_SYSTEM = "councilToken"; + bytes32 internal constant _COUNCIL_NFT_SYSTEM = "councilToken"; function _removeAllCouncilMembers(uint epochIndex) internal { SetUtil.AddressSet storage members = Council.load().councilMembers; diff --git a/protocol/oracle-manager/contracts/mocks/pyth/MockPyth.sol b/protocol/oracle-manager/contracts/mocks/pyth/MockPyth.sol index c73d2d6c29..c7066fc20b 100644 --- a/protocol/oracle-manager/contracts/mocks/pyth/MockPyth.sol +++ b/protocol/oracle-manager/contracts/mocks/pyth/MockPyth.sol @@ -6,11 +6,11 @@ import "./PythStructs.sol"; import "./PythErrors.sol"; contract MockPyth is AbstractPyth { - mapping(bytes32 => PythStructs.PriceFeed) priceFeeds; - uint64 sequenceNumber; + mapping(bytes32 => PythStructs.PriceFeed) internal priceFeeds; + uint64 internal sequenceNumber; - uint singleUpdateFeeInWei; - uint validTimePeriod; + uint internal singleUpdateFeeInWei; + uint internal validTimePeriod; constructor(uint _validTimePeriod, uint _singleUpdateFeeInWei) { singleUpdateFeeInWei = _singleUpdateFeeInWei; diff --git a/protocol/synthetix/contracts/interfaces/external/IOracleManager.sol b/protocol/synthetix/contracts/interfaces/external/IOracleManager.sol index b62f10f30b..167504559c 100644 --- a/protocol/synthetix/contracts/interfaces/external/IOracleManager.sol +++ b/protocol/synthetix/contracts/interfaces/external/IOracleManager.sol @@ -4,6 +4,7 @@ pragma solidity >=0.8.11 <0.9.0; import "@synthetixio/oracle-manager/contracts/interfaces/INodeModule.sol"; /// @title Effective interface for the oracle manager +// solhint-disable-next-line no-empty-blocks interface IOracleManager is INodeModule { } diff --git a/protocol/synthetix/contracts/mocks/CcipRouterMock.sol b/protocol/synthetix/contracts/mocks/CcipRouterMock.sol index 3845a4f7c3..e42d2de5d2 100644 --- a/protocol/synthetix/contracts/mocks/CcipRouterMock.sol +++ b/protocol/synthetix/contracts/mocks/CcipRouterMock.sol @@ -4,6 +4,7 @@ pragma solidity >=0.8.4; import "../interfaces/external/ICcipRouterClient.sol"; contract CcipRouterMock { + // solhint-disable no-empty-blocks function ccipSend( uint64 destinationChainId, CcipClient.EVM2AnyMessage calldata message @@ -13,4 +14,5 @@ contract CcipRouterMock { uint64 destinationChainId, CcipClient.EVM2AnyMessage memory message ) external view virtual returns (uint256 fee) {} + // solhint-enable no-empty-blocks } diff --git a/protocol/synthetix/contracts/storage/Vault.sol b/protocol/synthetix/contracts/storage/Vault.sol index 9e01a0d313..6ff9e52cc9 100644 --- a/protocol/synthetix/contracts/storage/Vault.sol +++ b/protocol/synthetix/contracts/storage/Vault.sol @@ -51,6 +51,7 @@ library Vault { /** * @dev The previous debt of the vault, when `updateCreditCapacity` was last called by the Pool. */ + // solhint-disable-next-line var-name-mixedcase int128 _unused_prevTotalDebtD18; /** * @dev Vault data for all the liquidation cycles divided into epochs.