Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: incorrect escalation storage handling #90

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
_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
Expand Down
Loading