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;