Function: postGraded(address modeler, string _ipfsGraded, uint256 _performanceResult, string _ipfsGradeDetailLink)
This facilitates grading a specific modeler.
Inputs
modelerControl: Fully controlled by the caller.
Constraints: Checked that the modeler has been challenged and responded.
Impact: The modeler to be graded.
_ipfsGradedControl: Fully controlled by the caller.
Constraints: None.
Impact: The IPFS of the grade.
_performanceResultControl: Fully controlled by the caller.
Constraints: None.
Impact: The performance result of the modeler.
_ipfsGradeDetailLinkControl: Fully controlled by the caller.
Constraints: None.
Impact: The IPFS of the grade detail link.
Branches and code coverage
Intended branches
Assure that the modeler's response was issued for the specific challenge. Currently not performed.
Assumed that the
topNModelersarray will properly update within the competition contract. Currently not checked.Assumed that the challenge's performance is graded for this contract's specific competition. Currently not explicitly checked.
Set the
ipfsGradedof themodelerChallengesmapping for themodeler.Set the
performanceResultof themodelerChallengesmapping for themodeler.Set the
ipfsGradeDetailLinkof themodelerChallengesmapping for themodeler.Set the
medianPerformanceResultsof themodelersmapping for themodeler. Currently this simply refers to theperformanceResultof themodelerChallengesmapping for themodeler.
Negative behavior
Should not allow a validator that is not directly linked to the modeler to grade them. Currently not checked.
Should not allow overriding a grade. Currently not checked.
Should not allow calling this while the contract is paused.