-
Notifications
You must be signed in to change notification settings - Fork 0
✨ Consider Hyperlane gas #374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
|
Since MatrixStrategyExecutor will be calling MitosisVault methods relayed through HPL, it looks like we’ll need to make some changes here as well. |
There was a problem hiding this 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);
No description provided.