private JObject GetCurrentPhase() { var attendanceDetectionPhase = _systemContractReader.IsAttendanceDetectionPhase(); var vrfSubmissionPhase = _systemContractReader.IsVrfSubmissionPhase(); var keyGenPhase = _systemContractReader.IsKeyGenPhase(); return(new JObject { ["AttendanceSubmissionPhase"] = attendanceDetectionPhase, ["VrfSubmissionPhase"] = vrfSubmissionPhase, ["KeyGenPhase"] = keyGenPhase, }); }
private JObject GetCurrentCycle() { var attendanceDetectionPhase = _systemContractReader.IsAttendanceDetectionPhase(); var vrfSubmissionPhase = _systemContractReader.IsVrfSubmissionPhase(); var keyGenPhase = _systemContractReader.IsKeyGenPhase(); var phase = attendanceDetectionPhase ? "AttendanceSubmissionPhase" : vrfSubmissionPhase ? "VrfSubmissionPhase" : keyGenPhase ? "KeyGenPhase" : "None"; return(new JObject { ["currentPeriod"] = phase, ["cycle"] = _blockManager.GetHeight() / StakingContract.CycleDuration, }); }