Skip to content

Conversation

@tac0turtle
Copy link
Contributor

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Refactoring

Related Issues

Fixes #(issue)

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Testing

Additional Notes

@tac0turtle tac0turtle marked this pull request as ready for review December 8, 2025 13:44
@tac0turtle tac0turtle requested a review from a team as a code owner December 8, 2025 13:44
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @tac0turtle, 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 introduces a new public getter function to the FeeVault smart contract, enabling transparent access to its complete configuration. This enhancement improves the contract's inspectability and usability for integrated systems, ensuring that all critical parameters can be easily queried. The change is fully covered by a new unit test to guarantee its correctness and reliability.

Highlights

  • New Configuration Getter: A new external view function, getConfig(), has been added to the FeeVault.sol contract. This function allows external callers to retrieve all current configuration parameters of the vault, including owner, destination domain, recipient address, minimum amount, call fee, bridge share basis points, other recipient, and the hypNativeMinter address.
  • Unit Test for getConfig: A new test case, test_GetConfig(), has been added to FeeVault.t.sol. This test verifies that the getConfig() function correctly returns all the expected configuration values as they are set within the FeeVault contract.
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.

@claude
Copy link

claude bot commented Dec 8, 2025

Claude encountered an error —— View job


I'll analyze this and get back to you.

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 getConfig function to the FeeVault contract, allowing external callers to retrieve all configuration parameters in a single call. A corresponding test case has been added to verify the functionality. The implementation is sound, but I've suggested a refactoring to use a struct for the return value of getConfig. This will improve code clarity and make future extensions to the configuration easier to manage without breaking client integrations.

Comment on lines +134 to +159
/// @notice Return the full configuration currently stored in the contract.
function getConfig()
external
view
returns (
address _owner,
uint32 _destinationDomain,
bytes32 _recipientAddress,
uint256 _minimumAmount,
uint256 _callFee,
uint256 _bridgeShareBps,
address _otherRecipient,
address _hypNativeMinter
)
{
return (
owner,
destinationDomain,
recipientAddress,
minimumAmount,
callFee,
bridgeShareBps,
otherRecipient,
address(hypNativeMinter)
);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For better readability and future extensibility, consider returning a struct instead of a large tuple. This makes it easier for clients to consume the data and allows for non-breaking changes if more configuration variables are added later.

You would need to define a Config struct at the contract level like this:

struct Config {
    address owner;
    uint32 destinationDomain;
    bytes32 recipientAddress;
    uint256 minimumAmount;
    uint256 callFee;
    uint256 bridgeShareBps;
    address otherRecipient;
    address hypNativeMinter;
}

Then, the function can be updated as follows. Note that this will require updating test_GetConfig in FeeVault.t.sol to handle the struct return type.

    /// @notice Return the full configuration currently stored in the contract.
    function getConfig() external view returns (Config memory) {
        return Config({
            owner: owner,
            destinationDomain: destinationDomain,
            recipientAddress: recipientAddress,
            minimumAmount: minimumAmount,
            callFee: callFee,
            bridgeShareBps: bridgeShareBps,
            otherRecipient: otherRecipient,
            hypNativeMinter: address(hypNativeMinter)
        });
    }

Copy link
Contributor

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

Works for me. Thank you!

@tac0turtle tac0turtle enabled auto-merge (squash) December 8, 2025 13:47
@tac0turtle tac0turtle merged commit b25f83f into main Dec 8, 2025
19 of 20 checks passed
@tac0turtle tac0turtle deleted the marko/feevault_getters branch December 8, 2025 13:50
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.

3 participants