From 7402ee6b84789391479c5876b27be23fd579f7b2 Mon Sep 17 00:00:00 2001 From: picodes Date: Fri, 14 Jul 2023 18:02:19 +0200 Subject: [PATCH] H-02 --- contracts/Distributor.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/Distributor.sol b/contracts/Distributor.sol index bc4e49f..5f342dc 100644 --- a/contracts/Distributor.sol +++ b/contracts/Distributor.sol @@ -230,8 +230,9 @@ contract Distributor is UUPSHelper { /// @notice Freezes the Merkle tree update until the dispute is resolved /// @dev Requires a deposit of `disputeToken` that'll be slashed if the dispute is not accepted - /// @dev It is only possible to create a dispute for `disputePeriod` after each tree update + /// @dev It is only possible to create a dispute within `disputePeriod` after each tree update function disputeTree(string memory reason) external { + if (disputer != address(0)) revert UnresolvedDispute(); if (block.timestamp >= endOfDisputePeriod) revert InvalidDispute(); IERC20(disputeToken).safeTransferFrom(msg.sender, address(this), disputeAmount); disputer = msg.sender;