docs(natspec): apply house documentation standard across all contracts - #25
Merged
Conversation
Extends the NatSpec/section-banner standard (started by hand in CPPIVault) to every source file: boxed section banners, per-member NatSpec on state vars, structs, events and errors, and full @notice/@param/@return on every function. - Extract IOracleHealth into its own interface file (fixing the IOracleHeath filename typo) and import it in CPPIVault. - Promote trailing inline comments to NatSpec above each declaration. - Preserve every audit reference and rationale verbatim in meaning (H1/H2, H3, H5, H6, M1, M2, M3, M4, L1-L8, I1-I3, G2). - Name previously-unnamed interface return values so @return can bind (inert: return names are not part of the ABI). Comments only; no logic, signatures, or ordering changed. forge build clean, all 151 tests pass, 0 undocumented declarations remaining.
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.
Extends the NatSpec + section-banner standard you started by hand in
CPPIVault.solto the entire codebase.What changed
// ---- x ----dividers.@paramper field), event (+@paramper param), and error.@notice+@paramfor every argument +@returnfor every return value — on every external/public/internal function across all 15 source files.IOracleHealthextracted intosrc/interfaces/IOracleHealth.sol(fixing theIOracleHeathfilename typo) and imported intoCPPIVault.Preserved deliberately
Two benign, intentional deviations from "comments only"
IOracleHealthinterface extraction/rename (you initiated this).returns (uint256)→returns (uint256 valueWad)) so@returntags bind. Return names are not part of the ABI, so this is semantically inert.Verification
forge buildclean.src/.Docs only.