document the safeTransfer self-flow branch in LibFlow.flowERC20 NatSpec#468
Conversation
The NatSpec only mentioned `safeTransferFrom`. The implementation also calls `safeTransfer` when `from == address(this)` (OZ `transferFrom` consumes allowance even when `from == msg.sender`). NatSpec now states both branches and the reason for the asymmetry. Closes #379. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughUpdated NatSpec documentation for ChangesERC20 Transfer Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Rebase PR #468 onto current main to re-trigger CI (prior red was a stale magic-nix-cache run). Merge is a clean union: PR touches only src/lib/LibFlow.sol NatSpec; main adds disjoint tests. forge fmt + build clean; Flow.transfer.t.sol (21 tests) passes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Reviewed 7e5c79b: document the safeTransfer self-flow branch in LibFlow.flowERC20 NatSpec — rebased onto main (test-only union conflict resolution + forge fmt), all checks green. LGTM. |
Summary
LibFlow.flowERC20NatSpec only mentionedsafeTransferFrom. The implementation also callssafeTransferwhenfrom == address(this)(OZtransferFromconsumes allowance even whenfrom == msg.sender, so the self-flow branch must usesafeTransferinstead). NatSpec now states both branches and the reason for the asymmetry.Closes #379.
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit