From 756970909f673004d7e3b5b8dc78f0cfa1ac3647 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Tue, 24 Sep 2024 13:18:53 +0100 Subject: [PATCH] fix: silence linter warnings in tests --- packages/contracts-rfq/test/FastBridgeV2.t.sol | 2 +- packages/contracts-rfq/test/MockERC20.sol | 8 ++++---- packages/contracts-rfq/test/UniversalTokenLib.t.sol | 1 + packages/contracts-rfq/test/UniversalTokenLibHarness.sol | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/contracts-rfq/test/FastBridgeV2.t.sol b/packages/contracts-rfq/test/FastBridgeV2.t.sol index 4fe357e3f2..39881c5151 100644 --- a/packages/contracts-rfq/test/FastBridgeV2.t.sol +++ b/packages/contracts-rfq/test/FastBridgeV2.t.sol @@ -10,7 +10,7 @@ import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol" import {Test} from "forge-std/Test.sol"; import {stdStorage, StdStorage} from "forge-std/Test.sol"; -// solhint-disable no-empty-blocks +// solhint-disable no-empty-blocks, ordering abstract contract FastBridgeV2Test is Test { using stdStorage for StdStorage; diff --git a/packages/contracts-rfq/test/MockERC20.sol b/packages/contracts-rfq/test/MockERC20.sol index 9736a896c7..f4c07d49aa 100644 --- a/packages/contracts-rfq/test/MockERC20.sol +++ b/packages/contracts-rfq/test/MockERC20.sol @@ -10,10 +10,6 @@ contract MockERC20 is ERC20 { _decimals = decimals_; } - function decimals() public view override returns (uint8) { - return _decimals; - } - function burn(address account, uint256 amount) external { _burn(account, amount); } @@ -21,4 +17,8 @@ contract MockERC20 is ERC20 { function mint(address account, uint256 amount) external { _mint(account, amount); } + + function decimals() public view override returns (uint8) { + return _decimals; + } } diff --git a/packages/contracts-rfq/test/UniversalTokenLib.t.sol b/packages/contracts-rfq/test/UniversalTokenLib.t.sol index 19e796e52d..58bbd34435 100644 --- a/packages/contracts-rfq/test/UniversalTokenLib.t.sol +++ b/packages/contracts-rfq/test/UniversalTokenLib.t.sol @@ -8,6 +8,7 @@ import {MockRevertingRecipient} from "./MockRevertingRecipient.sol"; import {Test} from "forge-std/Test.sol"; +// solhint-disable ordering contract UniversalTokenLibraryTest is Test { UniversalTokenLibHarness public libHarness; MockERC20 public token; diff --git a/packages/contracts-rfq/test/UniversalTokenLibHarness.sol b/packages/contracts-rfq/test/UniversalTokenLibHarness.sol index b4ea21182b..7f8d2d6753 100644 --- a/packages/contracts-rfq/test/UniversalTokenLibHarness.sol +++ b/packages/contracts-rfq/test/UniversalTokenLibHarness.sol @@ -3,6 +3,7 @@ pragma solidity ^0.8.17; import {UniversalTokenLib} from "../contracts/libs/UniversalToken.sol"; +// solhint-disable ordering contract UniversalTokenLibHarness { function universalTransfer(address token, address to, uint256 value) public { UniversalTokenLib.universalTransfer(token, to, value);