From 31553de96eec46a68c273a74dfed70215bb0b718 Mon Sep 17 00:00:00 2001 From: moebius <0xmoebius@tutanota.com> Date: Thu, 7 Dec 2023 22:59:16 +0100 Subject: [PATCH] fix: resolve pr suggestions --- solidity/test/integration/BondEscalation.t.sol | 11 +++-------- solidity/test/integration/Finalization.t.sol | 2 -- solidity/test/utils/Helpers.sol | 4 ++-- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/solidity/test/integration/BondEscalation.t.sol b/solidity/test/integration/BondEscalation.t.sol index 6cf62e2e..c67436b4 100644 --- a/solidity/test/integration/BondEscalation.t.sol +++ b/solidity/test/integration/BondEscalation.t.sol @@ -237,12 +237,7 @@ contract Integration_BondEscalation is IntegrationBase { _bondEscalationModule.pledgeForDispute(_request, _secondDispute); vm.stopPrank(); - // Step 10: The dispute goes to the resolution module - // oracle.escalateDispute(_request, _secondResponse, _secondDispute); - // _disputeStatus = oracle.disputeStatus(_disputeId); - // assertEq(uint256(_disputeStatus), uint256(IOracle.DisputeStatus.Escalated), 'Mismatch: Dispute status'); - - // Step 11: Because Another proposer's answer is disputed, a third party can propose a new answer + // Step 10: Because Another proposer's answer is disputed, a third party can propose a new answer address _thirdProposer = makeAddr('thirdProposer'); IOracle.Response memory _thirdResponse = IOracle.Response({proposer: _thirdProposer, requestId: _requestId, response: abi.encode('third response')}); @@ -252,7 +247,7 @@ contract Integration_BondEscalation is IntegrationBase { _responseId = oracle.proposeResponse(_request, _thirdResponse); vm.stopPrank(); - // Step 12: It goes undisputed for three days, therefore it's deemed correct and final + // Step 11: It goes undisputed for three days, therefore it's deemed correct and final vm.roll(_expectedDeadline + 1); oracle.finalize(_request, _thirdResponse); @@ -286,7 +281,7 @@ contract Integration_BondEscalation is IntegrationBase { 'Mismatch: Second Disputer balance' ); - // Step 13: Two days after the deadline, the resolution module says that Another proposer's answer was correct + // Step 12: Two days after the deadline, the resolution module says that Another proposer's answer was correct // So Another proposer gets paid Disputer's bond vm.roll(_expectedDeadline + 2 days); _mockArbitrator.setAnswer(IOracle.DisputeStatus.Lost); diff --git a/solidity/test/integration/Finalization.t.sol b/solidity/test/integration/Finalization.t.sol index e3dc4f2d..a70c594a 100644 --- a/solidity/test/integration/Finalization.t.sol +++ b/solidity/test/integration/Finalization.t.sol @@ -102,7 +102,6 @@ contract Integration_Finalization is IntegrationBase { vm.prank(_finalizer); - //asdf // Check: reverts if request has no response? vm.expectRevert(IOracle.Oracle_InvalidFinalizedResponse.selector); @@ -112,7 +111,6 @@ contract Integration_Finalization is IntegrationBase { /** * @notice Test to check that finalizing a request with a ongoing dispute with revert. */ - //asdf function test_revertFinalizeWithDisputedResponse() public { address _callbackTarget = makeAddr('target'); vm.etch(_callbackTarget, hex'069420'); diff --git a/solidity/test/utils/Helpers.sol b/solidity/test/utils/Helpers.sol index 226e0b83..81b580dd 100644 --- a/solidity/test/utils/Helpers.sol +++ b/solidity/test/utils/Helpers.sol @@ -35,10 +35,10 @@ contract Helpers is DSTestPlus, TestConstants { * * @param _address The address to check */ - function _assumeFuzzable(address _address) internal pure { + function _assumeFuzzable(address _address) internal view { assumeNotForgeAddress(_address); assumeNotZeroAddress(_address); - assumeNotPrecompile(_address, 10); // using Optimsim chaind id for precompiles filtering + assumeNotPrecompile(_address, block.chainid); // using Optimsim chaind id for precompiles filtering } /**