Skip to content

Conversation

@0xh3rman
Copy link
Collaborator

@0xh3rman 0xh3rman commented Oct 15, 2025

@semanticdiff-com
Copy link

semanticdiff-com bot commented Oct 15, 2025

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @0xh3rman, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the handling and tracking of swap transactions by integrating a dedicated SwapResult field into transaction metadata. This provides clearer insight into the status and details of swap operations. Concurrently, it refactors the internal representation of swap provider types to streamline mode-based filtering and improves the reliability of transaction log parsing for the Across API. A concrete implementation for retrieving swap results for HyperCoreBridge transactions has also been added.

Highlights

  • SwapResult Integration: Introduced a new swap_result: Option<SwapResult> field to TransactionSwapMetadata to provide a structured way of tracking the outcome of swap operations, initialized to None across various transaction mappers.
  • ProviderType Refactor: Refactored ProviderType to directly store its SwapProviderMode as a field, simplifying how swap providers are categorized and filtered throughout the swapper logic.
  • Across API Robustness: Improved the parsing of Across API transaction logs by switching from index-based access to a more robust topic-based search for the FundsDeposited event.
  • HyperCoreBridge Swap Status: Implemented a specific get_swap_result method for HyperCoreBridge to provide accurate SwapResult information for HyperCore bridge transactions.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a swap_result field to TransactionSwapMetadata, enabling better tracking of swap outcomes. The changes are well-integrated across various crates, including mappers for EVM and Solana. I commend the refactoring efforts, such as moving SwapperProviderMode to the primitives crate and caching the mode within ProviderType, which enhances code structure and maintainability. The update to the across provider to use event topics instead of fragile log indices is a significant improvement in robustness.

However, I've identified a significant issue in the hyperliquid provider where a placeholder implementation incorrectly reports all swaps as completed. This could lead to displaying inaccurate information to users. My review includes a suggestion to address this.

@0xh3rman 0xh3rman closed this Oct 15, 2025
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.

2 participants