Skip to content

specify ordering guarantees in LibFlow.flow NatSpec#469

Open
thedavidmeister wants to merge 1 commit intomainfrom
2026-05-07-issue-381-libflow-ordering-natspec
Open

specify ordering guarantees in LibFlow.flow NatSpec#469
thedavidmeister wants to merge 1 commit intomainfrom
2026-05-07-issue-381-libflow-ordering-natspec

Conversation

@thedavidmeister
Copy link
Copy Markdown
Contributor

Summary

LibFlow.flow NatSpec said "Guarantees ordering of the transfers" without naming which ordering. The function actually guarantees two distinct orderings:

  1. Token-class: all ERC20 transfers complete before any ERC721, all ERC721 before any ERC1155.
  2. Within-class: transfers occur in array index order.

NatSpec now spells out both so a caller relying on either property doesn't have to read the source.

Closes #381.

Test plan

  • NatSpec-only

🤖 Generated with Claude Code

The previous "Guarantees ordering of the transfers" was vague — it
didn't say which ordering. The function actually guarantees two
distinct orderings: token-class (ERC20 → ERC721 → ERC1155) and
within-class (array index order). NatSpec now spells out both so a
caller relying on either does not have to read the source.

Closes #381.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Warning

Rate limit exceeded

@thedavidmeister has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 49 minutes and 13 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 898fa09e-74b1-45ea-a309-42a50802a309

📥 Commits

Reviewing files that changed from the base of the PR and between ceaea3c and e7df10c.

📒 Files selected for processing (1)
  • src/lib/LibFlow.sol
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-05-07-issue-381-libflow-ordering-natspec

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@thedavidmeister thedavidmeister self-assigned this May 9, 2026
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.

[A23-9] [INFO] LibFlow.flow ordering guarantee unspecified in NatSpec

1 participant