docs(pair): clarify numerator/denominator naming and document error conditions#194
docs(pair): clarify numerator/denominator naming and document error conditions#194thedavidmeister wants to merge 1 commit into
Conversation
…onditions Renames outputsA/priceA → numeratorOutputs/numeratorPrice and outputsB/priceB → denominatorOutputs/denominatorPrice so the role of each symbol is unambiguous at the call site. Adds a comment marking that the denominator (symbolB) is fetched first due to the memory- truncation trick. Expands run() NatSpec to document the three inherited FTSO error conditions (InactiveFtso, StalePrice, PriceNotFinalized) and the DivisionByZero from LibDecimalFloat when the denominator price is zero. Closes #92 Closes #103 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 42 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #92
Closes #103
Summary
Two related readability issues in
LibOpFtsoCurrentPricePair.sol:#103 — inverted naming relative to call order
The pair op fetches the denominator symbol (symbolB) first via a memory-truncation trick, then the numerator (symbolA) second. The old variable names
outputsB/priceBfor the first call andoutputsA/priceAfor the second call follow the mathematical role of each price but are surprising when reading top-to-bottom code. Renames todenominatorOutputs/denominatorPriceandnumeratorOutputs/numeratorPrice, and adds a comment explaining that the denominator is fetched first.#92 — missing error documentation
run()NatSpec did not document:InactiveFtso,StalePrice,PriceNotFinalized) that can be raised from either price leg.DivisionByZerorevert fromLibDecimalFloatwhen the symbolB USD price is zero.Adds a
@devblock covering all of these.🤖 Generated with Claude Code