Skip to content

Commit 1ff55f8

Browse files
committed
docs: natspec for KlerosCore view functions
1 parent 4ba7b94 commit 1ff55f8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

contracts/src/arbitration/KlerosCoreBase.sol

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -981,18 +981,34 @@ abstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable
981981
(ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);
982982
}
983983

984+
/// @dev Gets the round info for a specified dispute and round.
985+
/// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.
986+
/// @param _disputeID The ID of the dispute.
987+
/// @param _round The round to get the info for.
988+
/// @return round The round info.
984989
function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {
985990
return disputes[_disputeID].rounds[_round];
986991
}
987992

993+
/// @dev Gets the PNK at stake per juror for a specified dispute and round.
994+
/// @param _disputeID The ID of the dispute.
995+
/// @param _round The round to get the info for.
996+
/// @return pnkAtStakePerJuror The PNK at stake per juror.
988997
function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {
989998
return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;
990999
}
9911000

1001+
/// @dev Gets the number of rounds for a specified dispute.
1002+
/// @param _disputeID The ID of the dispute.
1003+
/// @return The number of rounds.
9921004
function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {
9931005
return disputes[_disputeID].rounds.length;
9941006
}
9951007

1008+
/// @dev Checks if a given dispute kit is supported by a given court.
1009+
/// @param _courtID The ID of the court to check the support for.
1010+
/// @param _disputeKitID The ID of the dispute kit to check the support for.
1011+
/// @return Whether the dispute kit is supported or not.
9961012
function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {
9971013
return courts[_courtID].supportedDisputeKits[_disputeKitID];
9981014
}

0 commit comments

Comments
 (0)