diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index 5b237aacb..ab81d6e95 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -21,7 +21,7 @@ dotenv.config(); const config: HardhatUserConfig = { solidity: { - version: "0.8.18", + version: "0.8.24", settings: { optimizer: { enabled: true, diff --git a/contracts/package.json b/contracts/package.json index f75f51420..9fcfab332 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -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", @@ -98,6 +98,6 @@ "typescript": "^5.3.3" }, "dependencies": { - "@kleros/vea-contracts": "^0.3.2" + "@kleros/vea-contracts": "^0.4.0" } } diff --git a/contracts/src/arbitration/CentralizedArbitrator.sol b/contracts/src/arbitration/CentralizedArbitrator.sol index 23dd1e0a0..efb5825e3 100644 --- a/contracts/src/arbitration/CentralizedArbitrator.sol +++ b/contracts/src/arbitration/CentralizedArbitrator.sol @@ -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"; @@ -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. } diff --git a/contracts/src/arbitration/DisputeTemplateRegistry.sol b/contracts/src/arbitration/DisputeTemplateRegistry.sol index 276e51ce1..bf1b77c6b 100644 --- a/contracts/src/arbitration/DisputeTemplateRegistry.sol +++ b/contracts/src/arbitration/DisputeTemplateRegistry.sol @@ -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"; diff --git a/contracts/src/arbitration/KlerosCore.sol b/contracts/src/arbitration/KlerosCore.sol index e93d5ce6e..e3bc02150 100644 --- a/contracts/src/arbitration/KlerosCore.sol +++ b/contracts/src/arbitration/KlerosCore.sol @@ -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"; diff --git a/contracts/src/arbitration/KlerosCoreBase.sol b/contracts/src/arbitration/KlerosCoreBase.sol index 33a09965c..ce6ed6202 100644 --- a/contracts/src/arbitration/KlerosCoreBase.sol +++ b/contracts/src/arbitration/KlerosCoreBase.sol @@ -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"; @@ -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. } diff --git a/contracts/src/arbitration/KlerosCoreNeo.sol b/contracts/src/arbitration/KlerosCoreNeo.sol index 90e7cfd3e..938bf6d60 100644 --- a/contracts/src/arbitration/KlerosCoreNeo.sol +++ b/contracts/src/arbitration/KlerosCoreNeo.sol @@ -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"; diff --git a/contracts/src/arbitration/KlerosGovernor.sol b/contracts/src/arbitration/KlerosGovernor.sol index 6492220d9..d37735d5d 100644 --- a/contracts/src/arbitration/KlerosGovernor.sol +++ b/contracts/src/arbitration/KlerosGovernor.sol @@ -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"; @@ -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. } diff --git a/contracts/src/arbitration/PolicyRegistry.sol b/contracts/src/arbitration/PolicyRegistry.sol index 6271f200e..cec29e76c 100644 --- a/contracts/src/arbitration/PolicyRegistry.sol +++ b/contracts/src/arbitration/PolicyRegistry.sol @@ -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"; diff --git a/contracts/src/arbitration/SortitionModule.sol b/contracts/src/arbitration/SortitionModule.sol index bb6a61722..4db44c5c4 100644 --- a/contracts/src/arbitration/SortitionModule.sol +++ b/contracts/src/arbitration/SortitionModule.sol @@ -8,7 +8,7 @@ * @custom:deployments: [] */ -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "./SortitionModuleBase.sol"; import "../proxy/UUPSProxiable.sol"; diff --git a/contracts/src/arbitration/SortitionModuleBase.sol b/contracts/src/arbitration/SortitionModuleBase.sol index 973f4beeb..24e32e6ea 100644 --- a/contracts/src/arbitration/SortitionModuleBase.sol +++ b/contracts/src/arbitration/SortitionModuleBase.sol @@ -8,7 +8,7 @@ * @custom:deployments: [] */ -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "./KlerosCore.sol"; import "./interfaces/ISortitionModule.sol"; @@ -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 * // diff --git a/contracts/src/arbitration/SortitionModuleNeo.sol b/contracts/src/arbitration/SortitionModuleNeo.sol index e7e8bed7c..0ac13b890 100644 --- a/contracts/src/arbitration/SortitionModuleNeo.sol +++ b/contracts/src/arbitration/SortitionModuleNeo.sol @@ -8,7 +8,7 @@ * @custom:deployments: [] */ -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "./SortitionModuleBase.sol"; import "../proxy/UUPSProxiable.sol"; diff --git a/contracts/src/arbitration/arbitrables/ArbitrableExample.sol b/contracts/src/arbitration/arbitrables/ArbitrableExample.sol index 3f7867834..0979a6920 100644 --- a/contracts/src/arbitration/arbitrables/ArbitrableExample.sol +++ b/contracts/src/arbitration/arbitrables/ArbitrableExample.sol @@ -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"; diff --git a/contracts/src/arbitration/arbitrables/DisputeResolver.sol b/contracts/src/arbitration/arbitrables/DisputeResolver.sol index cc731d5cf..76d3592e3 100644 --- a/contracts/src/arbitration/arbitrables/DisputeResolver.sol +++ b/contracts/src/arbitration/arbitrables/DisputeResolver.sol @@ -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. diff --git a/contracts/src/arbitration/dispute-kits/DisputeKitClassic.sol b/contracts/src/arbitration/dispute-kits/DisputeKitClassic.sol index fcb924300..0aa857091 100644 --- a/contracts/src/arbitration/dispute-kits/DisputeKitClassic.sol +++ b/contracts/src/arbitration/dispute-kits/DisputeKitClassic.sol @@ -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"; @@ -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. diff --git a/contracts/src/arbitration/dispute-kits/DisputeKitSybilResistant.sol b/contracts/src/arbitration/dispute-kits/DisputeKitSybilResistant.sol index 2d65aca07..40b805c05 100644 --- a/contracts/src/arbitration/dispute-kits/DisputeKitSybilResistant.sol +++ b/contracts/src/arbitration/dispute-kits/DisputeKitSybilResistant.sol @@ -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"; @@ -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 { diff --git a/contracts/src/arbitration/evidence/EvidenceModule.sol b/contracts/src/arbitration/evidence/EvidenceModule.sol index 16360854a..49ec09df2 100644 --- a/contracts/src/arbitration/evidence/EvidenceModule.sol +++ b/contracts/src/arbitration/evidence/EvidenceModule.sol @@ -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"; diff --git a/contracts/src/arbitration/evidence/ModeratedEvidenceModule.sol b/contracts/src/arbitration/evidence/ModeratedEvidenceModule.sol index 7312fd7c8..9275b16cf 100644 --- a/contracts/src/arbitration/evidence/ModeratedEvidenceModule.sol +++ b/contracts/src/arbitration/evidence/ModeratedEvidenceModule.sol @@ -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"; @@ -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. @@ -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. diff --git a/contracts/src/arbitration/interfaces/IArbitrableV2.sol b/contracts/src/arbitration/interfaces/IArbitrableV2.sol index cc8554efa..63706b515 100644 --- a/contracts/src/arbitration/interfaces/IArbitrableV2.sol +++ b/contracts/src/arbitration/interfaces/IArbitrableV2.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "./IArbitratorV2.sol"; diff --git a/contracts/src/arbitration/interfaces/IArbitratorV2.sol b/contracts/src/arbitration/interfaces/IArbitratorV2.sol index 35343fc6c..1d1b48465 100644 --- a/contracts/src/arbitration/interfaces/IArbitratorV2.sol +++ b/contracts/src/arbitration/interfaces/IArbitratorV2.sol @@ -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"; diff --git a/contracts/src/arbitration/interfaces/IDisputeKit.sol b/contracts/src/arbitration/interfaces/IDisputeKit.sol index 5a433287e..86430f663 100644 --- a/contracts/src/arbitration/interfaces/IDisputeKit.sol +++ b/contracts/src/arbitration/interfaces/IDisputeKit.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "./IArbitratorV2.sol"; diff --git a/contracts/src/arbitration/interfaces/IDisputeTemplateRegistry.sol b/contracts/src/arbitration/interfaces/IDisputeTemplateRegistry.sol index 3106568ec..d562eb825 100644 --- a/contracts/src/arbitration/interfaces/IDisputeTemplateRegistry.sol +++ b/contracts/src/arbitration/interfaces/IDisputeTemplateRegistry.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; /// @title IDisputeTemplate /// @notice Dispute Template interface. diff --git a/contracts/src/arbitration/interfaces/IEvidence.sol b/contracts/src/arbitration/interfaces/IEvidence.sol index 54b9146a1..9f1699bc9 100644 --- a/contracts/src/arbitration/interfaces/IEvidence.sol +++ b/contracts/src/arbitration/interfaces/IEvidence.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; /// @title IEvidence interface IEvidence { diff --git a/contracts/src/arbitration/interfaces/ISortitionModule.sol b/contracts/src/arbitration/interfaces/ISortitionModule.sol index 2a3c34df8..c68490222 100644 --- a/contracts/src/arbitration/interfaces/ISortitionModule.sol +++ b/contracts/src/arbitration/interfaces/ISortitionModule.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../libraries/Constants.sol"; diff --git a/contracts/src/arbitration/university/ISortitionModuleUniversity.sol b/contracts/src/arbitration/university/ISortitionModuleUniversity.sol index b170867e7..42ed6a096 100644 --- a/contracts/src/arbitration/university/ISortitionModuleUniversity.sol +++ b/contracts/src/arbitration/university/ISortitionModuleUniversity.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; import {ISortitionModule} from "../interfaces/ISortitionModule.sol"; diff --git a/contracts/src/arbitration/university/KlerosCoreUniversity.sol b/contracts/src/arbitration/university/KlerosCoreUniversity.sol index ddbf93775..d3e5be37c 100644 --- a/contracts/src/arbitration/university/KlerosCoreUniversity.sol +++ b/contracts/src/arbitration/university/KlerosCoreUniversity.sol @@ -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"; @@ -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. } diff --git a/contracts/src/arbitration/university/SortitionModuleUniversity.sol b/contracts/src/arbitration/university/SortitionModuleUniversity.sol index c21d0b230..a2d3f2c63 100644 --- a/contracts/src/arbitration/university/SortitionModuleUniversity.sol +++ b/contracts/src/arbitration/university/SortitionModuleUniversity.sol @@ -8,7 +8,7 @@ * @custom:deployments: [] */ -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "./KlerosCoreUniversity.sol"; import "./ISortitionModuleUniversity.sol"; @@ -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. // ************************************* // diff --git a/contracts/src/gateway/ForeignGateway.sol b/contracts/src/gateway/ForeignGateway.sol index 4bf43bf68..d69889edf 100644 --- a/contracts/src/gateway/ForeignGateway.sol +++ b/contracts/src/gateway/ForeignGateway.sol @@ -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"; @@ -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 * // diff --git a/contracts/src/gateway/HomeGateway.sol b/contracts/src/gateway/HomeGateway.sol index 93eff40fb..180b0e878 100644 --- a/contracts/src/gateway/HomeGateway.sol +++ b/contracts/src/gateway/HomeGateway.sol @@ -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"; diff --git a/contracts/src/gateway/interfaces/IForeignGateway.sol b/contracts/src/gateway/interfaces/IForeignGateway.sol index 0f44f00bc..163e3b783 100644 --- a/contracts/src/gateway/interfaces/IForeignGateway.sol +++ b/contracts/src/gateway/interfaces/IForeignGateway.sol @@ -6,10 +6,10 @@ /// @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"; +import "@kleros/vea-contracts/interfaces/gateways/IReceiverGateway.sol"; interface IForeignGateway is IArbitratorV2, IReceiverGateway { /// @dev To be emitted when a dispute is sent to the IHomeGateway. diff --git a/contracts/src/gateway/interfaces/IHomeGateway.sol b/contracts/src/gateway/interfaces/IHomeGateway.sol index 8a6931688..28a01fbfa 100644 --- a/contracts/src/gateway/interfaces/IHomeGateway.sol +++ b/contracts/src/gateway/interfaces/IHomeGateway.sol @@ -6,10 +6,10 @@ /// @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"; +import "@kleros/vea-contracts/interfaces/gateways/ISenderGateway.sol"; import "../../arbitration/interfaces/IArbitrableV2.sol"; interface IHomeGateway is IArbitrableV2, ISenderGateway { diff --git a/contracts/src/gateway/mock/VeaMock.sol b/contracts/src/gateway/mock/VeaMock.sol index 2a80e1da1..445b1da10 100644 --- a/contracts/src/gateway/mock/VeaMock.sol +++ b/contracts/src/gateway/mock/VeaMock.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; -import "@kleros/vea-contracts/src/interfaces/inboxes/IVeaInbox.sol"; -import "@kleros/vea-contracts/src/interfaces/outboxes/IVeaOutboxOnL1.sol"; +import "@kleros/vea-contracts/interfaces/inboxes/IVeaInbox.sol"; +import "@kleros/vea-contracts/interfaces/outboxes/IVeaOutboxOnL1.sol"; contract VeaMock is IVeaOutboxOnL1, IVeaInbox { /* solhint-disable */ diff --git a/contracts/src/kleros-v1/interfaces/IArbitrableV1.sol b/contracts/src/kleros-v1/interfaces/IArbitrableV1.sol index 9e035c27f..a4bf24fe3 100644 --- a/contracts/src/kleros-v1/interfaces/IArbitrableV1.sol +++ b/contracts/src/kleros-v1/interfaces/IArbitrableV1.sol @@ -5,7 +5,7 @@ /// @custom:auditors: [] /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "./IArbitratorV1.sol"; diff --git a/contracts/src/kleros-v1/interfaces/IArbitratorV1.sol b/contracts/src/kleros-v1/interfaces/IArbitratorV1.sol index 97befc96d..bdd82daa1 100644 --- a/contracts/src/kleros-v1/interfaces/IArbitratorV1.sol +++ b/contracts/src/kleros-v1/interfaces/IArbitratorV1.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "./IArbitrableV1.sol"; diff --git a/contracts/src/kleros-v1/interfaces/IEvidenceV1.sol b/contracts/src/kleros-v1/interfaces/IEvidenceV1.sol index 2e53be127..b39b8dddd 100644 --- a/contracts/src/kleros-v1/interfaces/IEvidenceV1.sol +++ b/contracts/src/kleros-v1/interfaces/IEvidenceV1.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; /** * @authors: [@ferittuncer, @hbarcelos] diff --git a/contracts/src/kleros-v1/interfaces/IKlerosLiquid.sol b/contracts/src/kleros-v1/interfaces/IKlerosLiquid.sol index 491674e9d..4611c1be4 100644 --- a/contracts/src/kleros-v1/interfaces/IKlerosLiquid.sol +++ b/contracts/src/kleros-v1/interfaces/IKlerosLiquid.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "./IArbitratorV1.sol"; diff --git a/contracts/src/kleros-v1/interfaces/ITokenController.sol b/contracts/src/kleros-v1/interfaces/ITokenController.sol index 473903c44..4cf989df6 100644 --- a/contracts/src/kleros-v1/interfaces/ITokenController.sol +++ b/contracts/src/kleros-v1/interfaces/ITokenController.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; /// @dev The token controller contract must implement these functions. See https://github.com/Giveth/minime/blob/master/contracts/TokenController.sol interface ITokenController { diff --git a/contracts/src/kleros-v1/kleros-liquid-xdai/WrappedPinakion.sol b/contracts/src/kleros-v1/kleros-liquid-xdai/WrappedPinakion.sol index 1c91d56ab..39abcbc5d 100644 --- a/contracts/src/kleros-v1/kleros-liquid-xdai/WrappedPinakion.sol +++ b/contracts/src/kleros-v1/kleros-liquid-xdai/WrappedPinakion.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "../interfaces/ITokenController.sol"; diff --git a/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/IERC677.sol b/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/IERC677.sol index 017ed2e1d..7536570fc 100644 --- a/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/IERC677.sol +++ b/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/IERC677.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; interface IERC677 { function transfer(address _to, uint256 _value) external returns (bool); diff --git a/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/IRandomAuRa.sol b/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/IRandomAuRa.sol index bbf3fe6b6..73e2f053a 100644 --- a/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/IRandomAuRa.sol +++ b/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/IRandomAuRa.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; interface IRandomAuRa { function currentSeed() external view returns (uint256); diff --git a/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/ITokenBridge.sol b/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/ITokenBridge.sol index 87eab23b0..3e6d7b59c 100644 --- a/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/ITokenBridge.sol +++ b/contracts/src/kleros-v1/kleros-liquid-xdai/interfaces/ITokenBridge.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "./IERC677.sol"; diff --git a/contracts/src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol b/contracts/src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol index ed8249b80..7bc52279e 100644 --- a/contracts/src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol +++ b/contracts/src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; @@ -168,15 +168,15 @@ contract xKlerosLiquidV2 is Initializable, ITokenController, IArbitratorV2 { // Dispute // Use a mapping instead of an array so that upgrading (appending variables to) the Dispute struct is possible without big layout changes. - mapping(uint256 => Dispute) public disputes; // The disputes. + mapping(uint256 disputeId => Dispute) public disputes; // The disputes. uint256 public totalDisputes; // Juror - mapping(address => Juror) public jurors; // The jurors. + mapping(address account => Juror) public jurors; // The jurors. IForeignGateway public foreignGateway; // Foreign gateway contract. - mapping(uint256 => uint256) public disputesRuling; + mapping(uint256 disputeId => uint256 rulingId) public disputesRuling; // ************************************* // // * Function Modifiers * // diff --git a/contracts/src/kleros-v1/kleros-liquid/KlerosLiquidToV2Governor.sol b/contracts/src/kleros-v1/kleros-liquid/KlerosLiquidToV2Governor.sol index e8cf617af..266b3a549 100644 --- a/contracts/src/kleros-v1/kleros-liquid/KlerosLiquidToV2Governor.sol +++ b/contracts/src/kleros-v1/kleros-liquid/KlerosLiquidToV2Governor.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../interfaces/IKlerosLiquid.sol"; import "../interfaces/ITokenController.sol"; @@ -27,10 +27,10 @@ contract KlerosLiquidToV2Governor is IArbitrableV2, ITokenController { IArbitratorV2 public immutable foreignGateway; IKlerosLiquid public immutable klerosLiquid; address public governor; - mapping(uint256 => uint256) public klerosLiquidDisputeIDtoGatewayDisputeID; - mapping(uint256 => DisputeData) public disputes; // disputes[gatewayDisputeID] - mapping(address => uint256) public frozenTokens; // frozenTokens[account] locked token which shouldn't have been blocked. - mapping(uint256 => mapping(uint256 => bool)) public isDisputeNotified; // isDisputeNotified[disputeID][roundID] used to track the notification of frozen tokens. + mapping(uint256 disputeId => uint256 gatewayDisputeId) public klerosLiquidDisputeIDtoGatewayDisputeID; + mapping(uint256 gatewayDisputeId => DisputeData) public disputes; // disputes[gatewayDisputeID] + mapping(address account => uint256 tokenAmount) public frozenTokens; // frozenTokens[account] locked token which shouldn't have been blocked. + mapping(uint256 disputeId => mapping(uint256 roundId => bool)) public isDisputeNotified; // isDisputeNotified[disputeID][roundID] used to track the notification of frozen tokens. // ************************************* // // * Function Modifiers * // diff --git a/contracts/src/libraries/CappedMath.sol b/contracts/src/libraries/CappedMath.sol index 92e4494ee..656c40b89 100644 --- a/contracts/src/libraries/CappedMath.sol +++ b/contracts/src/libraries/CappedMath.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; /// @title CappedMath /// @dev Math operations with caps for under and overflow. diff --git a/contracts/src/libraries/Constants.sol b/contracts/src/libraries/Constants.sol index e6a9d8554..44e9b4cd6 100644 --- a/contracts/src/libraries/Constants.sol +++ b/contracts/src/libraries/Constants.sol @@ -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"; diff --git a/contracts/src/libraries/SafeERC20.sol b/contracts/src/libraries/SafeERC20.sol index 1e9963c58..2623dd8ef 100644 --- a/contracts/src/libraries/SafeERC20.sol +++ b/contracts/src/libraries/SafeERC20.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT // Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol -pragma solidity ^0.8.18; +pragma solidity 0.8.24; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; diff --git a/contracts/src/libraries/SortitionSumTreeFactory.sol b/contracts/src/libraries/SortitionSumTreeFactory.sol index 3b1cf47a1..eab7b1ab8 100644 --- a/contracts/src/libraries/SortitionSumTreeFactory.sol +++ b/contracts/src/libraries/SortitionSumTreeFactory.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; /// @title SortitionSumTreeFactory /// @author Enrique Piqueras - @@ -20,8 +20,8 @@ library SortitionSumTreeFactory { uint[] stack; uint[] nodes; // Two-way mapping of IDs to node indexes. Note that node index 0 is reserved for the root node, and means the ID does not have a node. - mapping(bytes32 => uint) IDsToNodeIndexes; - mapping(uint => bytes32) nodeIndexesToIDs; + mapping(bytes32 id => uint index) IDsToNodeIndexes; + mapping(uint index => bytes32 id) nodeIndexesToIDs; } /// Storage diff --git a/contracts/src/proxy/Initializable.sol b/contracts/src/proxy/Initializable.sol index e9fc1eb05..cdf8c7345 100644 --- a/contracts/src/proxy/Initializable.sol +++ b/contracts/src/proxy/Initializable.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) -pragma solidity 0.8.18; +pragma solidity 0.8.24; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed diff --git a/contracts/src/proxy/UUPSProxiable.sol b/contracts/src/proxy/UUPSProxiable.sol index ad45d3505..258a7a622 100644 --- a/contracts/src/proxy/UUPSProxiable.sol +++ b/contracts/src/proxy/UUPSProxiable.sol @@ -8,7 +8,7 @@ * @bounties: [] * @deployments: [] */ -pragma solidity 0.8.18; +pragma solidity 0.8.24; /** * @title UUPS Proxiable diff --git a/contracts/src/proxy/UUPSProxy.sol b/contracts/src/proxy/UUPSProxy.sol index 95ea941b9..f04f814e9 100644 --- a/contracts/src/proxy/UUPSProxy.sol +++ b/contracts/src/proxy/UUPSProxy.sol @@ -8,7 +8,7 @@ * @bounties: [] * @deployments: [] */ -pragma solidity 0.8.18; +pragma solidity 0.8.24; /** * @title UUPS Proxy diff --git a/contracts/src/proxy/mock/UUPSUpgradeableMocks.sol b/contracts/src/proxy/mock/UUPSUpgradeableMocks.sol index ec31d62f6..8133dd5c5 100644 --- a/contracts/src/proxy/mock/UUPSUpgradeableMocks.sol +++ b/contracts/src/proxy/mock/UUPSUpgradeableMocks.sol @@ -1,7 +1,7 @@ //SPDX-License-Identifier: MIT // Adapted from -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../UUPSProxiable.sol"; import "../Initializable.sol"; diff --git a/contracts/src/proxy/mock/by-inheritance/UpgradedByInheritance.sol b/contracts/src/proxy/mock/by-inheritance/UpgradedByInheritance.sol index bb8a8c17f..361b1e391 100644 --- a/contracts/src/proxy/mock/by-inheritance/UpgradedByInheritance.sol +++ b/contracts/src/proxy/mock/by-inheritance/UpgradedByInheritance.sol @@ -1,7 +1,7 @@ //SPDX-License-Identifier: MIT // Adapted from -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../UUPSProxiable.sol"; import "../../Initializable.sol"; diff --git a/contracts/src/proxy/mock/by-rewrite/UpgradedByRewrite.sol b/contracts/src/proxy/mock/by-rewrite/UpgradedByRewrite.sol index aefc7c1c7..91c75e0dc 100644 --- a/contracts/src/proxy/mock/by-rewrite/UpgradedByRewrite.sol +++ b/contracts/src/proxy/mock/by-rewrite/UpgradedByRewrite.sol @@ -1,7 +1,7 @@ //SPDX-License-Identifier: MIT // Adapted from -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../UUPSProxiable.sol"; import "../../Initializable.sol"; diff --git a/contracts/src/proxy/mock/by-rewrite/UpgradedByRewriteV2.sol b/contracts/src/proxy/mock/by-rewrite/UpgradedByRewriteV2.sol index 749041679..334a29fdf 100644 --- a/contracts/src/proxy/mock/by-rewrite/UpgradedByRewriteV2.sol +++ b/contracts/src/proxy/mock/by-rewrite/UpgradedByRewriteV2.sol @@ -1,7 +1,7 @@ //SPDX-License-Identifier: MIT // Adapted from -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../UUPSProxiable.sol"; import "../../Initializable.sol"; diff --git a/contracts/src/rng/BlockhashRNG.sol b/contracts/src/rng/BlockhashRNG.sol index 781fb3f7e..37afdfb34 100644 --- a/contracts/src/rng/BlockhashRNG.sol +++ b/contracts/src/rng/BlockhashRNG.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "./RNG.sol"; @@ -12,7 +12,7 @@ import "./RNG.sol"; /// This contract must be used when returning 0 is a worse failure mode than returning another blockhash. /// Allows saving the random number for use in the future. It allows the contract to still access the blockhash even after 256 blocks. contract BlockHashRNG is RNG { - mapping(uint256 => uint256) public randomNumbers; // randomNumbers[block] is the random number for this block, 0 otherwise. + mapping(uint256 block => uint256 number) public randomNumbers; // randomNumbers[block] is the random number for this block, 0 otherwise. /// @dev Request a random number. /// @param _block Block the random number is linked to. diff --git a/contracts/src/rng/IRandomizer.sol b/contracts/src/rng/IRandomizer.sol index da925f9a1..546d5a4cd 100644 --- a/contracts/src/rng/IRandomizer.sol +++ b/contracts/src/rng/IRandomizer.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; // Randomizer protocol interface interface IRandomizer { diff --git a/contracts/src/rng/IncrementalNG.sol b/contracts/src/rng/IncrementalNG.sol index 6cede4dae..43b304ee0 100644 --- a/contracts/src/rng/IncrementalNG.sol +++ b/contracts/src/rng/IncrementalNG.sol @@ -4,7 +4,7 @@ /// @author JayBuidl /// @dev A Random Number Generator which returns a number incremented by 1 each time. Useful as a fallback method. -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "./RNG.sol"; contract IncrementalNG is RNG { diff --git a/contracts/src/rng/RNG.sol b/contracts/src/rng/RNG.sol index ad9c597a3..0037fc5cd 100644 --- a/contracts/src/rng/RNG.sol +++ b/contracts/src/rng/RNG.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; interface RNG { /// @dev Request a random number. diff --git a/contracts/src/rng/RandomizerRNG.sol b/contracts/src/rng/RandomizerRNG.sol index 41dc072f7..4cb147804 100644 --- a/contracts/src/rng/RandomizerRNG.sol +++ b/contracts/src/rng/RandomizerRNG.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "./RNG.sol"; import "./IRandomizer.sol"; @@ -17,8 +17,8 @@ contract RandomizerRNG is RNG, UUPSProxiable, Initializable { address public governor; // The address that can withdraw funds. uint256 public callbackGasLimit; // Gas limit for the randomizer callback IRandomizer public randomizer; // Randomizer address. - mapping(uint256 => uint256) public randomNumbers; // randomNumbers[requestID] is the random number for this request id, 0 otherwise. - mapping(address => uint256) public requesterToID; // Maps the requester to his latest request ID. + mapping(uint256 requestId => uint256 number) public randomNumbers; // randomNumbers[requestID] is the random number for this request id, 0 otherwise. + mapping(address requester => uint256 requestId) public requesterToID; // Maps the requester to his latest request ID. // ************************************* // // * Function Modifiers * // diff --git a/contracts/src/rng/mock/RandomizerMock.sol b/contracts/src/rng/mock/RandomizerMock.sol index 9718bd718..3bd3be6fc 100644 --- a/contracts/src/rng/mock/RandomizerMock.sol +++ b/contracts/src/rng/mock/RandomizerMock.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../RandomizerRNG.sol"; diff --git a/contracts/src/token/Faucet.sol b/contracts/src/token/Faucet.sol index 4a1cf5e69..21512ab7e 100644 --- a/contracts/src/token/Faucet.sol +++ b/contracts/src/token/Faucet.sol @@ -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"; diff --git a/contracts/src/token/PNK.sol b/contracts/src/token/PNK.sol index 2ed7d0200..c643f82c7 100644 --- a/contracts/src/token/PNK.sol +++ b/contracts/src/token/PNK.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; diff --git a/contracts/src/token/PinakionV2.sol b/contracts/src/token/PinakionV2.sol index 3fdc6e634..844aa7bfb 100644 --- a/contracts/src/token/PinakionV2.sol +++ b/contracts/src/token/PinakionV2.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; @@ -11,7 +11,7 @@ import "../libraries/SafeERC20.sol"; contract PinakionV2 is ERC20, ERC20Burnable, Ownable { using SafeERC20 for IERC20; - constructor() ERC20("PinakionV2", "PNK") { + constructor() ERC20("PinakionV2", "PNK") Ownable(msg.sender) { _mint(msg.sender, 1000000000 * 10 ** decimals()); } diff --git a/contracts/src/token/TestERC20.sol b/contracts/src/token/TestERC20.sol index 93a4f70a4..7743cd158 100644 --- a/contracts/src/token/TestERC20.sol +++ b/contracts/src/token/TestERC20.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; diff --git a/contracts/src/token/TestERC721.sol b/contracts/src/token/TestERC721.sol index e81341ebc..a27428095 100644 --- a/contracts/src/token/TestERC721.sol +++ b/contracts/src/token/TestERC721.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; @@ -59,12 +59,19 @@ contract TestERC721 is ERC721, ERC721Enumerable { // * Internal * // // ************************************* // - function _beforeTokenTransfer( - address from, + function _increaseBalance(address account, uint128 value) internal virtual override(ERC721, ERC721Enumerable) { + super._increaseBalance(account, value); + } + + // ************************************* // + // * Internal * // + // ************************************* // + + function _update( address to, - uint256 firstTokenId, - uint256 batchSize - ) internal virtual override(ERC721, ERC721Enumerable) { - super._beforeTokenTransfer(from, to, firstTokenId, batchSize); + uint256 tokenId, + address auth + ) internal virtual override(ERC721, ERC721Enumerable) returns (address) { + super._update(to, tokenId, auth); } } diff --git a/contracts/src/token/WrappedPinakionV2.sol b/contracts/src/token/WrappedPinakionV2.sol index ba04ccbe6..efa55bb2d 100644 --- a/contracts/src/token/WrappedPinakionV2.sol +++ b/contracts/src/token/WrappedPinakionV2.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; diff --git a/yarn.lock b/yarn.lock index f5af811bb..7a0153f81 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6092,12 +6092,12 @@ __metadata: "@kleros/kleros-v2-eslint-config": "workspace:^" "@kleros/kleros-v2-prettier-config": "workspace:^" "@kleros/kleros-v2-tsconfig": "workspace:^" - "@kleros/vea-contracts": "npm:^0.3.2" + "@kleros/vea-contracts": "npm:^0.4.0" "@logtail/pino": "npm:^0.4.19" "@nomicfoundation/hardhat-chai-matchers": "npm:^1.0.6" "@nomiclabs/hardhat-ethers": "npm:^2.2.3" "@nomiclabs/hardhat-solhint": "npm:^3.0.1" - "@openzeppelin/contracts": "npm:^4.9.5" + "@openzeppelin/contracts": "npm:^5.0.2" "@typechain/ethers-v5": "npm:^11.1.2" "@typechain/hardhat": "npm:^7.0.0" "@types/chai": "npm:^4.3.11" @@ -6284,12 +6284,10 @@ __metadata: languageName: node linkType: hard -"@kleros/vea-contracts@npm:^0.3.2": - version: 0.3.2 - resolution: "@kleros/vea-contracts@npm:0.3.2" - dependencies: - "@openzeppelin/contracts": "npm:^4.8.3" - checksum: c91655c100f6623e230e5b7c1cb4308e9e382edfac5a63d2147a4a4ca83569418ca5f3e32a237a97c9668363cc2ce5e8a7d7133c9db7007e459a44e72ca37a2d +"@kleros/vea-contracts@npm:^0.4.0": + version: 0.4.0 + resolution: "@kleros/vea-contracts@npm:0.4.0" + checksum: 6e60eddf4f0bc9e687ddb83d634d800c75dc6bdd41be9f8904876f977dce2f661e183c4b3fc19d773d61b4b1d94fd4639c63d355d30e91f16f42d931a46dcbd5 languageName: node linkType: hard @@ -7891,17 +7889,10 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/contracts@npm:^4.8.3": - version: 4.9.3 - resolution: "@openzeppelin/contracts@npm:4.9.3" - checksum: ce0a16a56a39b62d72370ac702bce1917096492442ff05de88521beda2c3f3935b93ee2b9a184614dd543a6181f2f0be10243f5a629be87aab284ade68c18320 - languageName: node - linkType: hard - -"@openzeppelin/contracts@npm:^4.9.5": - version: 4.9.5 - resolution: "@openzeppelin/contracts@npm:4.9.5" - checksum: f221d91a7dd96f9187aa832f8a160d673feb2904711bd210fab56ccfd8b8351b8150b4f0bd247701f7d4adddceba83943c049c6da11d126e07164b9abff767e0 +"@openzeppelin/contracts@npm:^5.0.2": + version: 5.0.2 + resolution: "@openzeppelin/contracts@npm:5.0.2" + checksum: 938ebffbdade7dc59ea3df5b562c0e457bbefde9d82be8fa2acfd11da887df11653ac07922f41746b80cdbc106430e1e6978ce244fe99b00a7d9dc1418fc7670 languageName: node linkType: hard