feat: classify swaps via function selector matching#218
Closed
premiumjibles wants to merge 2 commits intomainfrom
Closed
feat: classify swaps via function selector matching#218premiumjibles wants to merge 2 commits intomainfrom
premiumjibles wants to merge 2 commits intomainfrom
Conversation
Swaps were misclassified as "Contract interaction" when Unchained returned empty tokenTransfers. Add known DEX function selector matching as a secondary classification signal, fix null safety for selector- matched swaps, and update enrichment guard to process swap-typed txs that lack token data. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
…d tests - Add self-send guard to selector check for consistency with contract check - Add comment acknowledging multi-purpose selectors (Universal Router, THORChain) - Add comment explaining enrichment guard intent - Add test for self-send with swap selector (should not match) - Add test for send with no tokenTransfers + matching known tx (should enrich) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
KNOWN_SWAP_SELECTORSset (~25 selectors covering Uniswap V2/V3, Universal Router, 1inch, 0x, CowSwap, Paraswap, THORChain) as a secondary classification signal when token transfers are emptytokenTransfers!→tokenTransfers ?? [])Test plan
swap, tokenTransfers[]contract🤖 Generated with Claude Code