From 738f131ee3a3a810b475745d9eb20f13856b41ba Mon Sep 17 00:00:00 2001 From: josojo Date: Wed, 10 Jan 2024 16:42:20 +0100 Subject: [PATCH] fixing other errors, like non-explict type --- .solhint.json | 1 - contracts/AdjudicationFramework.sol | 3 --- contracts/L1GlobalForkRequester.sol | 2 +- test/AdjudicationIntegration.t.sol | 1 - test/ForkableBridge.t.sol | 2 +- test/ForkableZkEVM.t.sol | 4 ++-- test/L1GlobalChainInfoPublisher.t.sol | 6 ------ 7 files changed, 4 insertions(+), 15 deletions(-) diff --git a/.solhint.json b/.solhint.json index 2b81e933..7c28fa1b 100644 --- a/.solhint.json +++ b/.solhint.json @@ -9,7 +9,6 @@ "func-visibility": ["warn",{"ignoreConstructors":true}], "custom-errors": "off", "reason-string": "off", - "explicit-types": "off", "one-contract-per-file": "off" } } \ No newline at end of file diff --git a/contracts/AdjudicationFramework.sol b/contracts/AdjudicationFramework.sol index 26d447d8..803bedd9 100644 --- a/contracts/AdjudicationFramework.sol +++ b/contracts/AdjudicationFramework.sol @@ -7,10 +7,7 @@ pragma solidity ^0.8.20; /* solhint-disable not-rely-on-time */ import {BalanceHolder} from "./lib/reality-eth/BalanceHolder.sol"; - import {IRealityETH} from "./lib/reality-eth/interfaces/IRealityETH.sol"; -import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; - import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; /* diff --git a/contracts/L1GlobalForkRequester.sol b/contracts/L1GlobalForkRequester.sol index 76ade789..ecfc69c0 100644 --- a/contracts/L1GlobalForkRequester.sol +++ b/contracts/L1GlobalForkRequester.sol @@ -153,7 +153,7 @@ contract L1GlobalForkRequester { ); if (doYesToken) { - uint newAmountToMigrate = amount - + uint256 newAmountToMigrate = amount - failedRequests[token][requester][requestId].amountMigratedYes; failedRequests[yesToken][requester][requestId] .amount += newAmountToMigrate; diff --git a/test/AdjudicationIntegration.t.sol b/test/AdjudicationIntegration.t.sol index 19fd78ab..48737457 100644 --- a/test/AdjudicationIntegration.t.sol +++ b/test/AdjudicationIntegration.t.sol @@ -16,7 +16,6 @@ import {RealityETH_v3_0} from "../contracts/lib/reality-eth/RealityETH-3.0.sol"; import {AdjudicationFramework} from "../contracts/AdjudicationFramework.sol"; import {L2ForkArbitrator} from "../contracts/L2ForkArbitrator.sol"; -import {L1GlobalChainInfoPublisher} from "../contracts/L1GlobalChainInfoPublisher.sol"; import {L1GlobalForkRequester} from "../contracts/L1GlobalForkRequester.sol"; import {L2ChainInfo} from "../contracts/L2ChainInfo.sol"; diff --git a/test/ForkableBridge.t.sol b/test/ForkableBridge.t.sol index d26c02ce..9777dafb 100644 --- a/test/ForkableBridge.t.sol +++ b/test/ForkableBridge.t.sol @@ -310,7 +310,7 @@ contract ForkableBridgeTest is Test { address forkableToken = forkableBridge.tokenInfoToWrappedToken( tokenInfoHash ); - for (uint i = 0; i < 32; i++) { + for (uint256 i = 0; i < 32; i++) { depositTreeHashes[i] = forkableBridge.branch(i); } // initialize the child contracts to set the parent contract diff --git a/test/ForkableZkEVM.t.sol b/test/ForkableZkEVM.t.sol index aa2c08f1..509dd378 100644 --- a/test/ForkableZkEVM.t.sol +++ b/test/ForkableZkEVM.t.sol @@ -124,7 +124,7 @@ contract ForkableZkEVMTest is Test { ); bytes32 newStateRoot = keccak256(abi.encodePacked("newStateRoot")); bytes32[24] memory proof; - for (uint i = 0; i < 24; i++) { + for (uint256 i = 0; i < 24; i++) { proof[i] = bytes32(abi.encodePacked("proof", i)); } @@ -150,7 +150,7 @@ contract ForkableZkEVMTest is Test { forkableZkEVM.consolidatePendingState(10); bytes32[24] memory proof; - for (uint i = 0; i < 24; i++) { + for (uint256 i = 0; i < 24; i++) { proof[i] = bytes32("0x"); // Whatever initialization value you want } diff --git a/test/L1GlobalChainInfoPublisher.t.sol b/test/L1GlobalChainInfoPublisher.t.sol index 45b12bc4..ee8abecf 100644 --- a/test/L1GlobalChainInfoPublisher.t.sol +++ b/test/L1GlobalChainInfoPublisher.t.sol @@ -7,12 +7,6 @@ pragma solidity ^0.8.20; import {Test} from "forge-std/Test.sol"; import {VerifierRollupHelperMock} from "@RealityETH/zkevm-contracts/contracts/mocks/VerifierRollupHelperMock.sol"; -import {IRealityETH} from "../contracts/lib/reality-eth/interfaces/IRealityETH.sol"; -import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import {ForkableRealityETH_ERC20} from "../contracts/ForkableRealityETH_ERC20.sol"; -import {RealityETH_v3_0} from "../contracts/lib/reality-eth/RealityETH-3.0.sol"; -import {AdjudicationFramework} from "../contracts/AdjudicationFramework.sol"; - import {IForkableStructure} from "../contracts/interfaces/IForkableStructure.sol"; import {L1GlobalChainInfoPublisher} from "../contracts/L1GlobalChainInfoPublisher.sol"; import {L2ChainInfo} from "../contracts/L2ChainInfo.sol";