Skip to content

Conversation

@Dark-Brain07
Copy link

Related Issue

N/A (Improves documentation quality and coverage across core libraries)

Description of changes

This PR enhances the codebase documentation by adding comprehensive NatSpec comments to 14 core library and type files. It specifically focuses on clarifying low-level implementation details, bit manipulation logic, and assembly operations in the libraries and types directories.

Detailed changes:

  • Added robust library-level documentation explaining the purpose, usage, and memory layout (where applicable) for each file.
  • Documented over 50+ functions with @notice, @dev, @param, and @return tags.
  • Enhanced developer comments for assembly blocks and bitwise operations to improve readability and maintainability.
  • Added EIP-1153 transient storage explanations to CurrencyReserves.sol.
  • Clarified memory layout for packed structs in Slot0.sol and PoolKey.sol.
  • Documented Currency value type and associated library functions.

Files improved:

  • src/libraries/: BitMath.sol, CurrencyReserves.sol, FixedPoint96.sol, FixedPoint128.sol, LiquidityMath.sol, Lock.sol, ParseBytes.sol, SafeCast.sol, UnsafeMath.sol, NonzeroDeltaCount.sol, CurrencyDelta.sol
  • src/types/: BalanceDelta.sol, BeforeSwapDelta.sol, PoolId.sol, Currency.sol, Slot0.sol, PoolOperation.sol
  • test/: Added FixedPointLibraries.t.sol for coverage.

@Dark-Brain07 Dark-Brain07 requested a review from a team as a code owner January 25, 2026 02:53
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