Omniscia Steer Protocol Audit
DynamicJobs Code Style Findings
DynamicJobs Code Style Findings
DJS-01C: Improper Toggle Terminology
Type | Severity | Location |
---|---|---|
Code Style | DynamicJobs.sol:L159 |
Description:
The toggleForCreator
function acts as a setter function instead.
Example:
contracts/DynamicJobs.sol
159function toggleForCreator(bytes32 _jobHash, uint256 _toggle) external {160 require(creator == msg.sender, "Access Denied");161 require(_toggle == 1 || _toggle == 2, "Invalid");162 jobState[_jobHash] = _toggle;163 emit JobToggledByCreator(_jobHash, _toggle);164}
Recommendation:
We advise it to be marked as such to avoid confusion for its integrators.
Alleviation (200f275c40cbd4798f4a416c044ea726755d4741):
The toggleForCreator
function has been aptly renamed to setJobState
, greatly enhancing its legibility.