Skip to content

Commit

Permalink
test: incorrect escalation storage handling
Browse files Browse the repository at this point in the history
  • Loading branch information
0xShaito committed Dec 17, 2024
1 parent af33b14 commit 1b39b29
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions solidity/test/integration/BondEscalation.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Check warning on line 131 in solidity/test/integration/BondEscalation.t.sol

View workflow job for this annotation

GitHub Actions / Run Linters (16.x)

'secondResponse' should start with _
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;

Check warning on line 138 in solidity/test/integration/BondEscalation.t.sol

View workflow job for this annotation

GitHub Actions / Run Linters (16.x)

'secondDispute' should start with _
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
Expand Down

0 comments on commit 1b39b29

Please sign in to comment.