Function: postGraded(address modeler, string _ipfsGraded, uint256 _performanceResult, string _ipfsGradeDetailLink)
This facilitates grading a specific modeler.
Inputs
modeler
Control: Fully controlled by the caller.
Constraints: Checked that the modeler has been challenged and responded.
Impact: The modeler to be graded.
_ipfsGraded
Control: Fully controlled by the caller.
Constraints: None.
Impact: The IPFS of the grade.
_performanceResult
Control: Fully controlled by the caller.
Constraints: None.
Impact: The performance result of the modeler.
_ipfsGradeDetailLink
Control: 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
topNModelers
array 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
ipfsGraded
of themodelerChallenges
mapping for themodeler
.Set the
performanceResult
of themodelerChallenges
mapping for themodeler
.Set the
ipfsGradeDetailLink
of themodelerChallenges
mapping for themodeler
.Set the
medianPerformanceResults
of themodelers
mapping for themodeler
. Currently this simply refers to theperformanceResult
of themodelerChallenges
mapping 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.