docs(contracts): full NatSpec sweep on AgentEscrow + surface two audit flags#3
Open
abhicris wants to merge 1 commit into
Open
docs(contracts): full NatSpec sweep on AgentEscrow + surface two audit flags#3abhicris wants to merge 1 commit into
abhicris wants to merge 1 commit into
Conversation
…t flags Cover every public/internal item with @notice/@dev/@param/@return tags. Also surface two issues discovered during the pass: 1. `registerAgent` is permissionless — any address can whitelist itself. Added a prominent WARNING in the @dev tag so integrators don't rely on `registeredAgents` as a trust anchor until an owner model is added. 2. `AgentDeregistered` is an orphaned event — it is declared but never emitted because no `deregisterAgent` function exists. The @dev tag marks it unreachable and defers it to a follow-up PR. No logic changes; ABI is identical.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Cover every public/internal item in
contracts/AgentEscrow.solwith@notice/@dev/@param/@returntags. No logic changes; ABI is identical tomain.What's in scope
contracts/AgentEscrow.sol@notice+@param indexeddocumentation@notice@devnotes (see below) — no behavior changesTwo audit flags surfaced (not fixed in this PR)
registerAgentis permissionless. Any address can whitelist itself by callingregisterAgent. The@devtag warns integrators not to rely onregisteredAgentsas a trust anchor until an owner model is added. Tracked for a follow-up PR.AgentDeregisteredis an orphaned event. It is declared but never emitted because noderegisterAgentfunction exists. The@devtag marks it unreachable and defers either removal or a matching function to a follow-up.What's NOT in scope
main)deregisterAgentimplementationTest plan
forge buildcleanforge testunchanged (no logic touched)main: emptyCloses nothing on its own — pairs naturally with #1 (parse_wei case fix) and #2 (Foundry suite) as part of the contracts-quality sweep.