Skip to content

Add NatSpec for StdUtils#830

Merged
zerosnacks merged 5 commits into
foundry-rs:masterfrom
esorense:natspec01
May 5, 2026
Merged

Add NatSpec for StdUtils#830
zerosnacks merged 5 commits into
foundry-rs:masterfrom
esorense:natspec01

Conversation

@esorense
Copy link
Copy Markdown
Contributor

@esorense esorense commented Mar 3, 2026

This PR adds missing NatSpec to stdMath and key StdUtils helpers (bound, boundPrivateKey, bytesToUint, computeCreate*, hashInitCode, and getTokenBalances).

This is needed because these widely used utility APIs were under-documented, and bound semantics are easy to misread without explicit wording. The updated comments now clearly describe the real behavior (including wrap-into-range behavior and deprecation notes).

Correctness is low-risk and verifiable: this is comment-only, with no logic, signature, or behavior changes. The annotations were written directly from the current implementation and existing revert conditions.

Comment thread src/StdMath.sol Outdated
zerosnacks
zerosnacks previously approved these changes May 5, 2026
Copy link
Copy Markdown
Member

@zerosnacks zerosnacks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@zerosnacks zerosnacks changed the title Add NatSpec for StdMath and StdUtils Add NatSpec for StdUtils May 5, 2026
@zerosnacks zerosnacks merged commit 8b531a0 into foundry-rs:master May 5, 2026
37 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants