Skip to content
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

feat(contracts): ValueRouter #4814

Merged
merged 28 commits into from
Dec 20, 2024
Merged

feat(contracts): ValueRouter #4814

merged 28 commits into from
Dec 20, 2024

Conversation

aroralanuk
Copy link
Contributor

@aroralanuk aroralanuk commented Nov 5, 2024

Description

Drive-by changes

  • overrideMsgValue and overrideGasLimit which actually override the respective fields

Related issues

Backward compatibility

Yes

Testing

Unit

yorhodes and others added 3 commits October 22, 2024 20:45
…#4729)

### Description

- implements `_outbound` and `_inbound` internal amount transforms for
use in scaling warp routes
- simplify `HypNativeScaled` implementation

### Backward compatibility

Yes

### Testing

Existing HypNative Scaled Unit Tests
…4673)

### Description

- fixes misuse of aggregation hook funds for relaying messages by making
sure msg.value is adequate and refunding if excess.

### Drive-by changes

- None

### Related issues

- related to
#3437

### Backward compatibility

No, needs new deployments of aggregationHooks

### Testing

Unit
Copy link

changeset-bot bot commented Nov 5, 2024

🦋 Changeset detected

Latest commit: 4f52a51

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@hyperlane-xyz/core Minor
@hyperlane-xyz/helloworld Patch
@hyperlane-xyz/sdk Patch
@hyperlane-xyz/infra Patch
@hyperlane-xyz/cli Patch
@hyperlane-xyz/widgets Patch
@hyperlane-xyz/ccip-server Patch
@hyperlane-xyz/github-proxy Patch
@hyperlane-xyz/utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@aroralanuk aroralanuk changed the base branch from audit-q3-2024 to main November 7, 2024 12:14
@aroralanuk aroralanuk marked this pull request as ready for review November 7, 2024 12:55
solidity/contracts/token/HypValue.sol Outdated Show resolved Hide resolved
solidity/contracts/hooks/OPL2ToL1Hook.sol Outdated Show resolved Hide resolved
solidity/contracts/token/HypValue.sol Outdated Show resolved Hide resolved
solidity/contracts/token/HypValue.sol Outdated Show resolved Hide resolved
solidity/contracts/token/HypValue.sol Outdated Show resolved Hide resolved
solidity/test/token/HypValue.t.sol Outdated Show resolved Hide resolved
solidity/test/token/HypValue.t.sol Outdated Show resolved Hide resolved
solidity/test/token/HypValue.t.sol Outdated Show resolved Hide resolved
solidity/test/token/HypValue.t.sol Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 20, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.

Project coverage is 77.58%. Comparing base (a51b50c) to head (4f52a51).
Report is 1 commits behind head on audit-q1-2025.

Additional details and impacted files
@@                Coverage Diff                @@
##           audit-q1-2025    #4814      +/-   ##
=================================================
+ Coverage          77.53%   77.58%   +0.05%     
=================================================
  Files                103      104       +1     
  Lines               2110     2124      +14     
  Branches             190      190              
=================================================
+ Hits                1636     1648      +12     
- Misses               453      455       +2     
  Partials              21       21              
Components Coverage Δ
core 87.80% <ø> (ø)
hooks 79.57% <100.00%> (+0.18%) ⬆️
isms 83.68% <ø> (ø)
token 90.90% <81.81%> (-0.37%) ⬇️
middlewares 79.80% <ø> (ø)

solidity/contracts/hooks/OPL2ToL1Hook.sol Outdated Show resolved Hide resolved
solidity/contracts/token/HypNative.sol Outdated Show resolved Hide resolved
solidity/contracts/token/HypNative.sol Outdated Show resolved Hide resolved
solidity/contracts/token/HypNative.sol Outdated Show resolved Hide resolved
solidity/test/token/HypNative.t.sol Outdated Show resolved Hide resolved
@aroralanuk aroralanuk requested a review from yorhodes November 28, 2024 08:59
solidity/contracts/token/HypNativeCollateral.sol Dismissed Show dismissed Hide dismissed
solidity/contracts/token/HypNativeCollateral.sol Dismissed Show dismissed Hide dismissed
solidity/contracts/hooks/libs/StandardHookMetadata.sol Outdated Show resolved Hide resolved
solidity/test/isms/ExternalBridgeTest.sol Outdated Show resolved Hide resolved
solidity/contracts/token/HypNative.sol Outdated Show resolved Hide resolved
solidity/contracts/token/HypNative.sol Outdated Show resolved Hide resolved
solidity/contracts/token/HypNative.sol Outdated Show resolved Hide resolved
solidity/contracts/token/HypNative.sol Outdated Show resolved Hide resolved
solidity/contracts/token/HypNativeCollateral.sol Outdated Show resolved Hide resolved
solidity/contracts/token/HypNative.sol Dismissed Show dismissed Hide dismissed
@@ -0,0 +1,84 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.8.0;

Check notice

Code scanning / Olympix Integrated Security

Using an unbounded pragma for Solidity version may be unsafe if future versions introduce breaking changes. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unbounded-pragma Low

Using an unbounded pragma for Solidity version may be unsafe if future versions introduce breaking changes. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unbounded-pragma
solidity/contracts/token/HypNativeCollateral.sol Dismissed Show dismissed Hide dismissed
* @notice This contract facilitates the transfer of value between chains using value transfer hooks
*/
contract HypNativeCollateral is HypNative {
constructor(address _mailbox) HypNative(_mailbox) {}

Check notice

Code scanning / Olympix Integrated Security

Test functions fail to thoroughly test all aspects of contract constructors, potentially missing critical initialization issues. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/incomplete-constructor-tests Low

Test functions fail to thoroughly test all aspects of contract constructors, potentially missing critical initialization issues. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/incomplete-constructor-tests
* @notice This contract facilitates the transfer of value between chains using value transfer hooks
*/
contract HypNativeCollateral is HypNative {
constructor(address _mailbox) HypNative(_mailbox) {}

Check notice

Code scanning / Olympix Integrated Security

Parameters passed to a constructor that are not validated for correct values may lead to contract creation in an undesired state. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/no-parameter-validation-in-constructor Low

Parameters passed to a constructor that are not validated for correct values may lead to contract creation in an undesired state. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/no-parameter-validation-in-constructor
@aroralanuk aroralanuk changed the base branch from main to audit-q1-2025 December 20, 2024 06:20
@aroralanuk aroralanuk merged commit b36bf0c into audit-q1-2025 Dec 20, 2024
36 of 38 checks passed
@aroralanuk aroralanuk deleted the kunal/value-router branch December 20, 2024 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants