From d1b32b62fef74c32a64195f34b8381719bd93946 Mon Sep 17 00:00:00 2001 From: alcercu Date: Thu, 17 Feb 2022 19:15:19 +0100 Subject: [PATCH] feat: add getTimesPerPeriod to KlerosCore --- contracts/src/arbitration/KlerosCore.sol | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/contracts/src/arbitration/KlerosCore.sol b/contracts/src/arbitration/KlerosCore.sol index d92012162..a339ea9e6 100644 --- a/contracts/src/arbitration/KlerosCore.sol +++ b/contracts/src/arbitration/KlerosCore.sol @@ -715,6 +715,15 @@ contract KlerosCore is IArbitrator { locked = juror.lockedTokens[_subcourtID]; } + /** @dev Gets the timesPerPeriod array for a given court. + * @param _subcourtID The ID of the court to get the times from. + * @return timesPerPeriod The timesPerPeriod array for the given court. + */ + function getTimesPerPeriod(uint96 _subcourtID) external view returns (uint256[4] memory timesPerPeriod) { + Court storage court = courts[_subcourtID]; + timesPerPeriod = court.timesPerPeriod; + } + // ************************************* // // * Public Views for Dispute Kits * // // ************************************* //