Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dotenv.config();

const config: HardhatUserConfig = {
solidity: {
version: "0.8.18",
version: "0.8.24",
settings: {
optimizer: {
enabled: true,
Expand Down
2 changes: 1 addition & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@nomicfoundation/hardhat-chai-matchers": "^1.0.6",
"@nomiclabs/hardhat-ethers": "^2.2.3",
"@nomiclabs/hardhat-solhint": "^3.0.1",
"@openzeppelin/contracts": "^4.9.5",
"@openzeppelin/contracts": "^5.0.2",
"@typechain/ethers-v5": "^11.1.2",
"@typechain/hardhat": "^7.0.0",
"@types/chai": "^4.3.11",
Expand Down
8 changes: 4 additions & 4 deletions contracts/src/arbitration/CentralizedArbitrator.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import {IArbitrableV2, IArbitratorV2, IERC20} from "./interfaces/IArbitratorV2.sol";

Expand Down Expand Up @@ -29,9 +29,9 @@ contract CentralizedArbitrator is IArbitratorV2 {
}

struct Round {
mapping(uint256 => uint256) paidFees; // Tracks the fees paid for each choice in this round.
mapping(uint256 => bool) hasPaid; // True if this choice was fully funded, false otherwise.
mapping(address => mapping(uint256 => uint256)) contributions; // Maps contributors to their contributions for each choice.
mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round.
mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise.
mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice.
uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.
uint256[] fundedChoices; // Stores the choices that are fully funded.
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/arbitration/DisputeTemplateRegistry.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
pragma solidity 0.8.24;

import "../proxy/UUPSProxiable.sol";
import "../proxy/Initializable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/arbitration/KlerosCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/// @custom:bounties: []
/// @custom:deployments: []

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import "./KlerosCoreBase.sol";
import {UUPSProxiable} from "../proxy/UUPSProxiable.sol";
Expand Down
4 changes: 2 additions & 2 deletions contracts/src/arbitration/KlerosCoreBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/// @custom:bounties: []
/// @custom:deployments: []

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import {IArbitrableV2, IArbitratorV2} from "./interfaces/IArbitratorV2.sol";
import {IDisputeKit} from "./interfaces/IDisputeKit.sol";
Expand Down Expand Up @@ -41,7 +41,7 @@ abstract contract KlerosCoreBase is IArbitratorV2 {
uint256 feeForJuror; // Arbitration fee paid per juror.
uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.
uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.
mapping(uint256 => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.
mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.
bool disabled; // True if the court is disabled. Unused for now, will be implemented later.
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/src/arbitration/KlerosCoreNeo.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/// @custom:bounties: []
/// @custom:deployments: []

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import "./KlerosCoreBase.sol";
import {UUPSProxiable} from "../proxy/UUPSProxiable.sol";
Expand Down
4 changes: 2 additions & 2 deletions contracts/src/arbitration/KlerosGovernor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/// @custom:auditors: []
/// @custom:deployments: []

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import {IArbitrableV2, IArbitratorV2} from "./interfaces/IArbitrableV2.sol";
import "./interfaces/IDisputeTemplateRegistry.sol";
Expand All @@ -31,7 +31,7 @@ contract KlerosGovernor is IArbitrableV2 {
uint256[] submittedLists; // Tracks all lists that were submitted in a session in the form submittedLists[submissionID].
uint256 sumDeposit; // Sum of all submission deposits in a session (minus arbitration fees). This is used to calculate the reward.
Status status; // Status of a session.
mapping(bytes32 => bool) alreadySubmitted; // Indicates whether or not the transaction list was already submitted in order to catch duplicates in the form alreadySubmitted[listHash].
mapping(bytes32 listHash => bool) alreadySubmitted; // Indicates whether or not the transaction list was already submitted in order to catch duplicates in the form alreadySubmitted[listHash].
uint256 durationOffset; // Time in seconds that prolongs the submission period after the first submission, to give other submitters time to react.
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/src/arbitration/PolicyRegistry.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
pragma solidity 0.8.24;

import "../proxy/UUPSProxiable.sol";
import "../proxy/Initializable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/arbitration/SortitionModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @custom:deployments: []
*/

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import "./SortitionModuleBase.sol";
import "../proxy/UUPSProxiable.sol";
Expand Down
8 changes: 4 additions & 4 deletions contracts/src/arbitration/SortitionModuleBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @custom:deployments: []
*/

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import "./KlerosCore.sol";
import "./interfaces/ISortitionModule.sol";
Expand Down Expand Up @@ -70,10 +70,10 @@ abstract contract SortitionModuleBase is ISortitionModule {
uint256 public rngLookahead; // Minimal block distance between requesting and obtaining a random number.
uint256 public delayedStakeWriteIndex; // The index of the last `delayedStake` item that was written to the array. 0 index is skipped.
uint256 public delayedStakeReadIndex; // The index of the next `delayedStake` item that should be processed. Starts at 1 because 0 index is skipped.
mapping(bytes32 => SortitionSumTree) sortitionSumTrees; // The mapping trees by keys.
mapping(address => Juror) public jurors; // The jurors.
mapping(bytes32 treeHash => SortitionSumTree) sortitionSumTrees; // The mapping trees by keys.
mapping(address account => Juror) public jurors; // The jurors.
mapping(uint256 => DelayedStake) public delayedStakes; // Stores the stakes that were changed during Drawing phase, to update them when the phase is switched to Staking.
mapping(address => mapping(uint96 => uint256)) public latestDelayedStakeIndex; // Maps the juror to its latest delayed stake. If there is already a delayed stake for this juror then it'll be replaced. latestDelayedStakeIndex[juror][courtID].
mapping(address jurorAccount => mapping(uint96 courtId => uint256)) public latestDelayedStakeIndex; // Maps the juror to its latest delayed stake. If there is already a delayed stake for this juror then it'll be replaced. latestDelayedStakeIndex[juror][courtID].

// ************************************* //
// * Events * //
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/arbitration/SortitionModuleNeo.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @custom:deployments: []
*/

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import "./SortitionModuleBase.sol";
import "../proxy/UUPSProxiable.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import {IArbitrableV2, IArbitratorV2} from "../interfaces/IArbitrableV2.sol";
import "../interfaces/IDisputeTemplateRegistry.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import {IArbitrableV2, IArbitratorV2} from "../interfaces/IArbitrableV2.sol";
import "../interfaces/IDisputeTemplateRegistry.sol";

pragma solidity 0.8.18;
pragma solidity 0.8.24;

/// @title DisputeResolver
/// DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/// @custom:bounties: []
/// @custom:deployments: []

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import "../KlerosCore.sol";
import "../interfaces/IDisputeKit.sol";
Expand Down Expand Up @@ -39,9 +39,9 @@ contract DisputeKitClassic is IDisputeKit, Initializable, UUPSProxiable {
bool tied; // True if there is a tie, false otherwise.
uint256 totalVoted; // Former uint[_appeal] votesInEachRound.
uint256 totalCommitted; // Former commitsInRound.
mapping(uint256 => uint256) paidFees; // Tracks the fees paid for each choice in this round.
mapping(uint256 => bool) hasPaid; // True if this choice was fully funded, false otherwise.
mapping(address => mapping(uint256 => uint256)) contributions; // Maps contributors to their contributions for each choice.
mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round.
mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise.
mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice.
uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.
uint256[] fundedChoices; // Stores the choices that are fully funded.
uint256 nbVotes; // Maximal number of votes this dispute can get.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/// @custom:bounties: []
/// @custom:deployments: []

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import "../KlerosCore.sol";
import "../interfaces/IDisputeKit.sol";
Expand Down Expand Up @@ -46,13 +46,13 @@ contract DisputeKitSybilResistant is IDisputeKit, Initializable, UUPSProxiable {
bool tied; // True if there is a tie, false otherwise.
uint256 totalVoted; // Former uint[_appeal] votesInEachRound.
uint256 totalCommitted; // Former commitsInRound.
mapping(uint256 => uint256) paidFees; // Tracks the fees paid for each choice in this round.
mapping(uint256 => bool) hasPaid; // True if this choice was fully funded, false otherwise.
mapping(address => mapping(uint256 => uint256)) contributions; // Maps contributors to their contributions for each choice.
mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round.
mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise.
mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice.
uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.
uint256[] fundedChoices; // Stores the choices that are fully funded.
uint256 nbVotes; // Maximal number of votes this dispute can get.
mapping(address => bool) alreadyDrawn; // Set to 'true' if the address has already been drawn, so it can't be drawn more than once.
mapping(address drawnAddress => bool) alreadyDrawn; // Set to 'true' if the address has already been drawn, so it can't be drawn more than once.
}

struct Vote {
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/arbitration/evidence/EvidenceModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/// @custom:deployments: []
/// @custom:tools: []

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import "../interfaces/IArbitratorV2.sol";
import "../interfaces/IEvidence.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/// @custom:deployments: []
/// @custom:tools: []

pragma solidity 0.8.18;
pragma solidity 0.8.24;

// TODO: standard interfaces should be placed in a separated repo (?)
import {IArbitrableV2, IArbitratorV2} from "../interfaces/IArbitrableV2.sol";
Expand Down Expand Up @@ -39,7 +39,7 @@ contract ModeratedEvidenceModule is IArbitrableV2 {
struct Moderation {
uint256[3] paidFees; // Tracks the fees paid by each side in this moderation.
uint256 feeRewards; // Sum of reimbursable fees and stake rewards available to the parties that made contributions to the side that ultimately wins a dispute.
mapping(address => uint256[3]) contributions; // Maps contributors to their contributions for each side.
mapping(address contributor => uint256[3]) contributions; // Maps contributors to their contributions for each side.
bool closed; // Moderation happens over a bounded period of time after which it is considered closed. If so, a new moderation round should be opened.
Party currentWinner; // The current winner of this moderation round.
uint256 bondDeadline; // The deadline until which the loser party can stake to overturn the current status.
Expand All @@ -57,7 +57,7 @@ contract ModeratedEvidenceModule is IArbitrableV2 {

uint256 public constant AMOUNT_OF_CHOICES = 2;
uint256 public constant MULTIPLIER_DIVISOR = 10000; // Divisor parameter for multipliers.
mapping(bytes32 => EvidenceData) evidences; // Maps the evidence ID to its data. evidences[evidenceID].
mapping(bytes32 evidenceId => EvidenceData) evidences; // Maps the evidence ID to its data. evidences[evidenceID].
mapping(uint256 => bytes32) public disputeIDtoEvidenceID; // One-to-one relationship between the dispute and the evidence.
ArbitratorData[] public arbitratorDataList; // Stores the arbitrator data of the contract. Updated each time the data is changed.
IArbitratorV2 public immutable arbitrator; // The trusted arbitrator to resolve potential disputes. If it needs to be changed, a new contract can be deployed.
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/arbitration/interfaces/IArbitrableV2.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import "./IArbitratorV2.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/src/arbitration/interfaces/IArbitratorV2.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./IArbitrableV2.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/arbitration/interfaces/IDisputeKit.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/// @custom:bounties: []
/// @custom:deployments: []

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import "./IArbitratorV2.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.18;
pragma solidity 0.8.24;

/// @title IDisputeTemplate
/// @notice Dispute Template interface.
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/arbitration/interfaces/IEvidence.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.18;
pragma solidity 0.8.24;

/// @title IEvidence
interface IEvidence {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
pragma solidity 0.8.24;

import "../../libraries/Constants.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
pragma solidity 0.8.24;

import {ISortitionModule} from "../interfaces/ISortitionModule.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import {IArbitrableV2, IArbitratorV2} from "../interfaces/IArbitratorV2.sol";
import {IDisputeKit} from "../interfaces/IDisputeKit.sol";
Expand Down Expand Up @@ -36,7 +36,7 @@ contract KlerosCoreUniversity is IArbitratorV2, UUPSProxiable, Initializable {
uint256 feeForJuror; // Arbitration fee paid per juror.
uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.
uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.
mapping(uint256 => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.
mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.
bool disabled; // True if the court is disabled. Unused for now, will be implemented later.
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @custom:deployments: []
*/

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import "./KlerosCoreUniversity.sol";
import "./ISortitionModuleUniversity.sol";
Expand Down Expand Up @@ -38,7 +38,7 @@ contract SortitionModuleUniversity is ISortitionModuleUniversity, UUPSProxiable,
address public governor; // The governor of the contract.
KlerosCoreUniversity public core; // The core arbitrator contract.
uint256 public disputesWithoutJurors; // The number of disputes that have not finished drawing jurors.
mapping(address => Juror) public jurors; // The jurors.
mapping(address account => Juror) public jurors; // The jurors.
address private transientJuror; // The juror address used between calls within the same transaction.

// ************************************* //
Expand Down
6 changes: 3 additions & 3 deletions contracts/src/gateway/ForeignGateway.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/// @custom:bounties: []
/// @custom:deployments: []

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import "./interfaces/IForeignGateway.sol";
import "../proxy/UUPSProxiable.sol";
Expand Down Expand Up @@ -39,14 +39,14 @@ contract ForeignGateway is IForeignGateway, UUPSProxiable, Initializable {
// ************************************* //

uint256 internal localDisputeID; // The disputeID must start from 1 as the KlerosV1 proxy governor depends on this implementation. We now also depend on localDisputeID not ever being zero.
mapping(uint96 => uint256) public feeForJuror; // feeForJuror[v2CourtID], it mirrors the value on KlerosCore.
mapping(uint96 courtId => uint256) public feeForJuror; // feeForJuror[v2CourtID], it mirrors the value on KlerosCore.
address public governor;
address public veaOutbox;
uint256 public override homeChainID;
address public override homeGateway;
address public deprecatedVeaOutbox;
uint256 public deprecatedVeaOutboxExpiration;
mapping(bytes32 => DisputeData) public disputeHashtoDisputeData;
mapping(bytes32 disputeHash => DisputeData) public disputeHashtoDisputeData;

// ************************************* //
// * Function Modifiers * //
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/gateway/HomeGateway.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/// @custom:bounties: []
/// @custom:deployments: []

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import "./interfaces/IForeignGateway.sol";
import "./interfaces/IHomeGateway.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/gateway/interfaces/IForeignGateway.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/// @custom:bounties: []
/// @custom:deployments: []

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import "../../arbitration/interfaces/IArbitratorV2.sol";
import "@kleros/vea-contracts/src/interfaces/gateways/IReceiverGateway.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/gateway/interfaces/IHomeGateway.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/// @custom:bounties: []
/// @custom:deployments: []

pragma solidity 0.8.18;
pragma solidity 0.8.24;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@kleros/vea-contracts/src/interfaces/gateways/ISenderGateway.sol";
Expand Down
Loading