SubmitReport()

SubmitReport() public returns (bool succes)

Description

The function can be called by anyone. This function is used to submit a report to a pending audit.

Require

It is required that the audit is not closed, that the owner of the audit is not the report owner (auditor) and that the bugs have a value < 5 (because the bugs can only be classified 1,2,3,4 for the risks critical too low and zero for no risk identified).

#Check require
require(!audits[_contracthash].closed, "submit report: audit is closed");
require(audits[_contracthash].owner != msg.sender, "submit report: auditor and auditee are the same");
require(_bugClaim[i] < 5);

Input

The input is the ID of the audit, the ID of the report, a url for the report details, the numbers of the bugs as identified in the detailed report and the claim (risk classification, for example medium) per bug.

#The input
bytes32 _contracthash, 
bytes32 _reporthash, 
string memory _link, 
uint256[10] memory _bugID, 
uint256[10] memory _bugClaim

Output

Returns true on successful execution.

#Returns value
returns (bool success)

Last updated

Was this helpful?