Skip to content

Add NatSpec for StdMath and StdUtils#830

Open
esorense wants to merge 1 commit intofoundry-rs:masterfrom
esorense:natspec01
Open

Add NatSpec for StdMath and StdUtils#830
esorense wants to merge 1 commit intofoundry-rs:masterfrom
esorense:natspec01

Conversation

@esorense
Copy link

@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.

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.

1 participant