docs: standardize positions and observations functions documentation #1018
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.
Description
Standardize the documentation format for
positions()
andobservations()
functions inIUniswapV3PoolState.sol
. This change focuses on improving clarity and maintaining consistency with Solidity documentation best practices.Changes
@return
tagsTechnical Details
The changes maintain all the important technical information while presenting it in a more standardized format:
positions()
: Clearly document the position key structure and return valuesobservations()
: Improve clarity of observation data structure documentationBefore and After Comparison
positions() Before:
// Returns liquidity The amount of liquidity in the position,
/// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,
/// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,
positions() After:
/// @return liquidity The amount of liquidity in the position
/// @return feeGrowthInside0LastX128 Fee growth of token0 inside the tick range as of the last mint/burn/poke
/// @return feeGrowthInside1LastX128 Fee growth of token1 inside the tick range as of the last mint/burn/poke
observations() Before:
/// @return blockTimestamp The timestamp of the observation,
/// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,
/// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,
observations() After:
/// @return blockTimestamp The timestamp of the observation
/// @return tickCumulative The tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp
/// @return secondsPerLiquidityCumulativeX128 The seconds per in range liquidity for the life of the pool as of the observation timestamp
Type of change
Documentation update (non-breaking change)
Checklist