Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion contracts/ClaimRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ contract ClaimRegistry is AccessControl, IClaimRegistry, ReentrancyGuard {
}

function getCanonicalClaim(bytes32 claimId) external view override returns (CanonicalClaim memory claim) {
if (!_canonicalClaimExists[claimId]) revert ClaimNotFound(claimId);
if (!_canonicalClaimExists[claimId]) revert CanonicalClaimNotFound(claimId);
return _canonicalClaims[claimId];
}

Expand Down
25 changes: 9 additions & 16 deletions contracts/DisputeResolution.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
Expand Down Expand Up @@ -39,7 +40,7 @@ import "./fees/IFeeManager.sol";
* The claim must be challengeable and within its window for a dispute to open.
* Appeal settlement / rewarding the challenger is OUT of scope (SC-016 non-goal).
*/
contract DisputeResolution is IDisputeResolution, ReentrancyGuard, Pausable {
contract DisputeResolution is IDisputeResolution, AccessControl, ReentrancyGuard, Pausable {
using SafeERC20 for IERC20;
// =========================================================================
// Constants & Roles
Expand Down Expand Up @@ -70,23 +71,21 @@ contract DisputeResolution is IDisputeResolution, ReentrancyGuard, Pausable {
/// @notice Bond token required to open a dispute.
address public bondToken;

/// @notice Bond amount required to open a dispute (in `bondToken` units).
/// @notice Bond amount required to open a dispute.
uint256 public bondAmount;

/// @notice Duration of the challenge window, measured from the claim's
/// verification deadline. The frozen/appeal deadline equals
/// verificationDeadline + challengeWindowDuration.
/// @notice Challenge window duration (in seconds).
uint64 public challengeWindowDuration;

/// @notice Monotonic dispute id source; the first dispute has id 1.
uint256 private _nextDisputeId = 1;

/// @notice disputeId => Dispute.
/// @notice Dispute records indexed by dispute ID.
mapping(uint256 => Dispute) private _disputes;

/// @notice claimId => disputeId (0 means none).
/// @notice Dispute ID indexed by claim ID (0 = no dispute).
mapping(uint256 => uint256) private _disputesByClaim;

/// @notice Monotonic dispute id source; the first dispute has id 1.
uint256 private _nextDisputeId = 1;

/// @dev Storage gap for upgradeability compatibility.
uint256[44] private __gap;

Expand All @@ -113,12 +112,6 @@ contract DisputeResolution is IDisputeResolution, ReentrancyGuard, Pausable {
// Errors
// =========================================================================

/// @notice Thrown when the registry or vault is a zero address on deploy.
error ZeroAddress();

/// @notice Thrown when bonding/fee config is missing on open.
error BondNotConfigured();

/// @notice Thrown when setting an invalid (zero) challenge window.
error InvalidChallengeWindow();

Expand Down
4 changes: 3 additions & 1 deletion contracts/StakeVault.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
import "./interfaces/ISTakeVault.sol";

/**
Expand Down Expand Up @@ -41,7 +43,7 @@ import "./interfaces/ISTakeVault.sol";
* transfer-out on release. The lock ledger is mutated BEFORE any transfer-out on
* release, so a malicious recipient cannot reenter a stale-locked state.
*/
contract StakeVault is ISTakeVault, ReentrancyGuard {
contract StakeVault is ISTakeVault, AccessControl, ReentrancyGuard, Pausable {
using SafeERC20 for IERC20;

// =========================================================================
Expand Down
2 changes: 1 addition & 1 deletion contracts/VerificationSubmission.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "./interfaces/IVerificationSubmission.sol";
import "./interfaces/IClaimRegistry.sol";

Expand Down
Loading
Loading