Skip to content

Commit 5dc39fa

Browse files
feat(DK): struct gaps
1 parent 59ca8e1 commit 5dc39fa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

contracts/src/arbitration/dispute-kits/DisputeKitClassicBase.sol

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ abstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxi
2727
bool jumped; // True if dispute jumped to a parent dispute kit and won't be handled by this DK anymore.
2828
mapping(uint256 => uint256) coreRoundIDToLocal; // Maps id of the round in the core contract to the index of the round of related local dispute.
2929
bytes extraData; // Extradata for the dispute.
30+
uint256[10] __gap; // Reserved slots for future upgrades.
3031
}
3132

3233
struct Round {
@@ -42,13 +43,15 @@ abstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxi
4243
uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.
4344
uint256[] fundedChoices; // Stores the choices that are fully funded.
4445
mapping(address drawnAddress => bool) alreadyDrawn; // True if the address has already been drawn, false by default.
46+
uint256[10] __gap; // Reserved slots for future upgrades.
4547
}
4648

4749
struct Vote {
4850
address account; // The address of the juror.
4951
bytes32 commit; // The commit of the juror. For courts with hidden votes.
5052
uint256 choice; // The choice of the juror.
5153
bool voted; // True if the vote has been cast.
54+
uint256[10] __gap; // Reserved slots for future upgrades.
5255
}
5356

5457
// ************************************* //
@@ -246,7 +249,8 @@ abstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxi
246249
}
247250

248251
if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) {
249-
round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));
252+
Vote storage vote = round.votes.push();
253+
vote.account = drawnAddress;
250254
round.alreadyDrawn[drawnAddress] = true;
251255
} else {
252256
drawnAddress = address(0);

0 commit comments

Comments
 (0)