From 1b39b294a8b24e046144d329746a5e75d5ae1e53 Mon Sep 17 00:00:00 2001 From: shaito Date: Tue, 17 Dec 2024 16:47:40 -0300 Subject: [PATCH] test: incorrect escalation storage handling --- solidity/test/integration/BondEscalation.t.sol | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/solidity/test/integration/BondEscalation.t.sol b/solidity/test/integration/BondEscalation.t.sol index 7a2360d..a783184 100644 --- a/solidity/test/integration/BondEscalation.t.sol +++ b/solidity/test/integration/BondEscalation.t.sol @@ -125,6 +125,22 @@ contract Integration_BondEscalation is IntegrationBase { vm.prank(proposer); _bondEscalationModule.pledgeAgainstDispute(mockRequest, mockDispute, _createAccessControl(proposer)); + ///////////////////////////// + // Propose again + _deposit(_bondEscalationAccounting, proposer, usdc, _expectedBondSize); + IOracle.Response memory secondResponse = mockResponse; + secondResponse.response = abi.encode('second response'); + vm.prank(proposer); + bytes32 _secondResponseId = oracle.proposeResponse(mockRequest, secondResponse, _createAccessControl(proposer)); + + // Dispute again + _deposit(_bondEscalationAccounting, disputer, usdc, _pledgeSize); + IOracle.Dispute memory secondDispute = mockDispute; + secondDispute.responseId = _secondResponseId; + vm.prank(disputer); + _disputeId = oracle.disputeResponse(mockRequest, secondResponse, secondDispute, _createAccessControl(disputer)); + //////////////////////////// + // Step 4: Disputer runs out of capital // Step 5: External parties see that Disputer's dispute was wrong so they don't join to escalate // Step 6: Proposer response's is deemed correct and final once the bond escalation window is over