Skip to content

Commit 83a8ba6

Browse files
committed
fix: support disputes with no token gate address specified
1 parent bcbe228 commit 83a8ba6

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ interface IBalanceHolderERC1155 {
2929
contract DisputeKitGated is DisputeKitClassicBase {
3030
string public constant override version = "2.0.0";
3131

32+
address private constant NO_TOKEN_GATE = address(0);
33+
3234
// ************************************* //
3335
// * Storage * //
3436
// ************************************* //
@@ -56,6 +58,7 @@ contract DisputeKitGated is DisputeKitClassicBase {
5658
uint256 _jumpDisputeKitID
5759
) external initializer {
5860
__DisputeKitClassicBase_initialize(_owner, _core, _wNative, _jumpDisputeKitID);
61+
supportedTokens[NO_TOKEN_GATE] = true; // Allows disputes without token gating
5962
}
6063

6164
// ************************ //
@@ -141,7 +144,7 @@ contract DisputeKitGated is DisputeKitClassicBase {
141144
(address tokenGate, bool isERC1155, uint256 tokenId) = _extraDataToTokenInfo(dispute.extraData);
142145

143146
// If no token gate is specified, allow all jurors
144-
if (tokenGate == address(0)) return true;
147+
if (tokenGate == NO_TOKEN_GATE) return true;
145148

146149
// Check juror's token balance
147150
if (isERC1155) {

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ interface IBalanceHolderERC1155 {
3030
contract DisputeKitGatedShutter is DisputeKitClassicBase {
3131
string public constant override version = "2.0.0";
3232

33+
address private constant NO_TOKEN_GATE = address(0);
34+
3335
// ************************************* //
3436
// * Storage * //
3537
// ************************************* //
@@ -85,6 +87,7 @@ contract DisputeKitGatedShutter is DisputeKitClassicBase {
8587
uint256 _jumpDisputeKitID
8688
) external initializer {
8789
__DisputeKitClassicBase_initialize(_owner, _core, _wNative, _jumpDisputeKitID);
90+
supportedTokens[NO_TOKEN_GATE] = true; // Allows disputes without token gating
8891
}
8992

9093
// ************************ //
@@ -265,7 +268,7 @@ contract DisputeKitGatedShutter is DisputeKitClassicBase {
265268
(address tokenGate, bool isERC1155, uint256 tokenId) = _extraDataToTokenInfo(dispute.extraData);
266269

267270
// If no token gate is specified, allow all jurors
268-
if (tokenGate == address(0)) return true;
271+
if (tokenGate == NO_TOKEN_GATE) return true;
269272

270273
// Check juror's token balance
271274
if (isERC1155) {

0 commit comments

Comments
 (0)