Harden 0-transfer paths, fix disputeInitiator, and add compact config telemetry (size‑safe) #522
+135
−48
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
safeTransferFromExact(..., 0)paths.disputeInitiatorstate non-misleading by setting it when a dispute is posted and clearing it when dispute bonds are settled.Description
function _t(address to, uint256 amount)toif (amount == 0) return;beforeTransferUtils.safeTransfer(...)to avoid tokens that revert on 0 transfers.applyForJob(...)and validator vote intake (_recordValidatorVote) only callTransferUtils.safeTransferFromExact(...)and update locked bond counters whenbond > 0.disputeInitiatorhygiene by settingjob.disputeInitiator = msg.senderindisputeJob(...)and clearing it (job.disputeInitiator = address(0)) in_settleDisputeBond(...)without changing storage layout.ConfigUintUpdated(compact uint telemetry) and a minimal role event (RoleUpdated) and wire them into previously-silent setters and role management paths via small helper(s) so monitoring can observe config/role changes._setRolehelper, applied selectiveuncheckedblocks and minor control-flow compactions (deadline checks, payout math and bond settlement rework) — all changes kept behavior and external interfaces intact.truffle-config.jsor changesolcViaIR; no public/external function signatures were changed.Testing
npx truffle compileand compilation completed successfully.npm run sizeand achievedAGIJobManager runtime bytecode size: 24575 bytes, meeting the configured limit.Codex Task