Skip to content

Commit 592facf

Browse files
committed
chore: nitpicks
1 parent 1003eb4 commit 592facf

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

contracts/src/RealityV2.sol

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,15 @@ contract RealitioProxyV2 is IRealitioArbitrator, IArbitrableV2 {
5050
// ************************************* //
5151

5252
uint256 private constant NUMBER_OF_RULING_OPTIONS = type(uint256).max; // Maximum, the number of choices in a Realitio question is unknown
53-
53+
5454
IRealitio public immutable override realitio; // Actual implementation of Realitio.
5555
string public override metadata; // Metadata for Realitio. See IRealitioArbitrator.
5656
address public governor; // The address that can make changes to the parameters of the contract.
5757
IDisputeTemplateRegistry public templateRegistry; // The dispute template registry.
5858
uint256 public templateId; // Dispute template identifier.
5959
mapping(uint256 questionID => ArbitrationRequest) public arbitrationRequests; // Maps a question identifier in uint256 to its arbitration details. Example: arbitrationRequests[uint256(questionID)]
60-
mapping(address arbitrator => mapping(uint256 disputeID => uint256 questionID)) public arbitratorDisputeIDToQuestionID; // Maps a dispute ID to the ID of the question (converted into uint) with the disputed request in the form arbitratorDisputeIDToQuestionID[arbitrator][disputeID].
60+
mapping(address arbitrator => mapping(uint256 disputeID => uint256 questionID))
61+
public arbitratorDisputeIDToQuestionID; // Maps a dispute ID to the ID of the question (converted into uint) with the disputed request in the form arbitratorDisputeIDToQuestionID[arbitrator][disputeID].
6162
ArbitrationParams[] public arbitrationParamsChanges;
6263

6364
// ************************************* //
@@ -178,11 +179,8 @@ contract RealitioProxyV2 is IRealitioArbitrator, IArbitrableV2 {
178179
bytes storage arbitratorExtraData = arbitrationParamsChanges[arbitrationParamsIndex].arbitratorExtraData;
179180

180181
// Notify Kleros
181-
disputeID = arbitrator.createDispute{value: msg.value}(
182-
NUMBER_OF_RULING_OPTIONS,
183-
arbitratorExtraData
184-
); /* If msg.value is greater than intended number of votes (specified in arbitratorExtraData),
185-
Kleros will automatically spend excess for additional votes. */
182+
// If msg.value is greater than intended number of votes (specified in arbitratorExtraData), Kleros will automatically spend excess for additional votes.
183+
disputeID = arbitrator.createDispute{value: msg.value}(NUMBER_OF_RULING_OPTIONS, arbitratorExtraData);
186184
arbitratorDisputeIDToQuestionID[address(arbitrator)][disputeID] = uint256(_questionID);
187185

188186
// Update internal state
@@ -262,7 +260,7 @@ contract RealitioProxyV2 is IRealitioArbitrator, IArbitrableV2 {
262260
/// @param _klerosRuling The ruling from Kleros.
263261
/// @return The ruling in Realitio format.
264262
function _klerosToRealitioRuling(uint256 _klerosRuling) internal pure returns (uint256) {
265-
if (_klerosRuling == 0) return type(uint256).max; // Refuse to arbitrate
263+
if (_klerosRuling == 0) return type(uint256).max; // Refuse to arbitrate / Invalid
266264
if (_klerosRuling == 1) return type(uint256).max - 1; // Answered Too Soon
267265
return _klerosRuling - 1; // Normal answers are shifted by 1
268266
}

0 commit comments

Comments
 (0)