RequestAudit()

RequestAudit() public payable returns (bool succes)

Description

The function can be called by anyone. This function is used to enter an audit request to the marketplace.

Require

It is required that the audit storage place is empty, that the msg.value is more than zero and that the rewards (and deposit minus fee) are multiples of eachother.

#Check require
require(audits[_contracthash].owner == address(0), "request audit: audit is non empty");
require(msg.value != 0, "request audit: no reward added");
require(amount.mod(totalRewards) == 0, "request audit: msg.value not equal to rewards");
require(_rewards[0].mod(_rewards[1]) == 0, "request audit: critical reward is not multiple of high reward");
require(_rewards[1].mod(_rewards[2]) == 0, "request audit: high reward is not multiple of medium reward");
require(_rewards[2].mod(_rewards[3]) == 0, "request audit: critical medium is not multiple of low reward");

Input

The inputs are the ID of the audit, the url to the details of the audit request and an array of the rewards for the 4 risks (critical, high, medium and low).

#The inputs
bytes32 _contracthash, 
string memory _link, 
uint256[4] memory _rewards

Output

Returns true on successful execution.

#Returns value
returns (bool success)

Last updated

Was this helpful?