Skip to content

Conversation

@byeongsu-hong
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Jun 11, 2025

@dbadoy
Copy link
Member

dbadoy commented Jun 11, 2025

Since MatrixStrategyExecutor will be calling MitosisVault methods relayed through HPL, it looks like we’ll need to make some changes here as well.

@byeongsu-hong byeongsu-hong marked this pull request as ready for review June 11, 2025 15:32
@byeongsu-hong byeongsu-hong requested a review from Copilot June 11, 2025 15:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds new gas quotation functions and updates many dispatch and mutative functions across multiple contract interfaces to be payable, enabling the forwarding of gas fees during Hyperlane operations.

  • Introduces quote functions for governance, asset initialization, matrix operations, and vault operations.
  • Updates dispatch and initialization functions to be payable and propagates msg.value to underlying Hyperlane gas router calls.
  • Refactors GasRouter and authorization methods to support action-based gas configuration.

Reviewed Changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/interfaces/hub/governance/IBranchGovernanceEntrypoint.sol Added a new quoteGovernanceExecution function and made dispatch functions payable.
src/interfaces/hub/core/IAssetManagerEntrypoint.sol Added multiple new gas quotation functions for asset and vault initializations.
src/interfaces/hub/core/IAssetManager.sol Updated asset management functions to be payable and added corresponding quote functions.
src/branch/strategy/IMatrixStrategyExecutor.sol Introduced new quote functions for liquidity deallocation and yield/loss settlement; updated payable signatures.
src/hub/governance/BranchGovernanceEntrypoint.sol Modified gas dispatch flows by integrating the msgType and forwarding msg.value.
src/hub/core/AssetManagerEntrypoint.sol Updated functions to forward msg.value when dispatching to branch chains.
src/hub/core/AssetManager.sol Updated several mutative functions to be payable for gas fee forwarding.
src/external/hyperlane/GasRouter.sol Refactored gas configuration with new action and gas types and updated event emission.
src/branch/* Various vault and entrypoint updates with new quoting functions and payable adjustments.
Comments suppressed due to low confidence (3)

src/hub/core/AssetManager.sol:151

  • Consider validating that msg.value provided in payable functions (for example, withdraw, deposit, and allocateMatrix) meets the expected gas fee obtained via the corresponding quotation functions. This helps ensure that transactions are not underfunded.
function withdraw(uint256 chainId, address hubAsset, address to, uint256 amount) external payable whenNotPaused {

src/external/hyperlane/MailboxClient.sol:104

  • [nitpick] Consider adding documentation for the virtual function _authorizeManageMailbox to clarify its intended authorization logic for future maintainability.
function _authorizeManageMailbox(address) internal virtual;

src/external/hyperlane/GasRouter.sol:102

  • Review the update in the GasSet event and ensure that using uint96 for action and uint128 for gas is consistent across all usage. Verify that all caller functions supply and handle these values correctly to avoid type mismatches.
emit GasSet(domain, action, gas);

@byeongsu-hong byeongsu-hong merged commit a2fc962 into main Jun 12, 2025
1 of 2 checks passed
@byeongsu-hong byeongsu-hong deleted the fix/hyperlane-gas-payment branch June 12, 2025 09:16
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.

4 participants