Skip to content

Commit

Permalink
fix: resolve pr suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
moebius committed Dec 7, 2023
1 parent 1a93a91 commit 31553de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
11 changes: 3 additions & 8 deletions solidity/test/integration/BondEscalation.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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')});
Expand All @@ -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);

Expand Down Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions solidity/test/integration/Finalization.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions solidity/test/utils/Helpers.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/**
Expand Down

0 comments on commit 31553de

Please sign in to comment.