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: scaled warp routes #5233

Open
wants to merge 12 commits into
base: audit-q3-2024
Choose a base branch
from
Open

feat: scaled warp routes #5233

wants to merge 12 commits into from

Conversation

yorhodes
Copy link
Member

@yorhodes yorhodes commented Jan 21, 2025

Description

  • Adopt scale across warp route contracts
  • Remove native scaled and support scaled everywhere
  • Update SDK deployer code to use new constructors

Related issues

Backward compatibility

SDK/CLI yes, core no

Testing

Unit Tests

Copy link

changeset-bot bot commented Jan 21, 2025

🦋 Changeset detected

Latest commit: 3a77772

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/sdk Patch
@hyperlane-xyz/core Major
@hyperlane-xyz/cli Patch
@hyperlane-xyz/helloworld Patch
@hyperlane-xyz/infra 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

@yorhodes yorhodes marked this pull request as ready for review January 24, 2025 19:29
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Olympix Integrated Security found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (audit-q3-2024@7a3b0d0). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             audit-q3-2024    #5233   +/-   ##
================================================
  Coverage                 ?   76.55%           
================================================
  Files                    ?      100           
  Lines                    ?     2005           
  Branches                 ?      184           
================================================
  Hits                     ?     1535           
  Misses                   ?      449           
  Partials                 ?       21           
Components Coverage Δ
core 87.80% <0.00%> (?)
hooks 78.01% <0.00%> (?)
isms 82.35% <0.00%> (?)
token 89.40% <0.00%> (?)
middlewares 79.61% <0.00%> (?)

solidity/contracts/token/HypERC721.sol Outdated Show resolved Hide resolved
typescript/sdk/src/token/deploy.ts Outdated Show resolved Hide resolved
@@ -12,6 +12,7 @@ export enum TokenType {
fastCollateral = 'fastCollateral',
collateralUri = 'collateralUri',
native = 'native',
// backwards compatible alias to native
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we up the sdk major version and just drop this instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

🤷 I figured it was nice that this didnt need to break SDK and CLI users with existing config

Copy link
Contributor

Choose a reason for hiding this comment

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

agree it's nice not to break existing config users, but we'll end up with a major SDK release for this anyway right because of the major changeset in its core dependency?

uint8 private immutable _decimals;

constructor(uint8 __decimals, address _mailbox) TokenRouter(_mailbox) {
constructor(

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

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
uint8 private immutable _decimals;

constructor(uint8 __decimals, address _mailbox) TokenRouter(_mailbox) {
constructor(
uint8 __decimals,

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

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
constructor(uint8 __decimals, address _mailbox) TokenRouter(_mailbox) {
constructor(
uint8 __decimals,
uint256 _scale,

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

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
constructor(
uint8 __decimals,
uint256 _scale,
address _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

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
@@ -21,7 +22,11 @@
* @notice Constructor
* @param erc20 Address of the token to keep as collateral
*/
constructor(address erc20, address _mailbox) TokenRouter(_mailbox) {
constructor(

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

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
@@ -42,8 +42,9 @@

constructor(
ERC4626 _vault,
uint256 _scale,

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

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
@@ -37,8 +37,9 @@

constructor(
ERC4626 _vault,
uint256 _scale,

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

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
@@ -8,8 +8,9 @@
contract HypFiatToken is HypERC20Collateral {
constructor(
address _fiatToken,
uint256 _scale,

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

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
@@ -7,8 +7,9 @@
contract HypXERC20 is HypERC20Collateral {
constructor(
address _xerc20,
uint256 _scale,

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

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
@@ -13,8 +13,15 @@

constructor(
address _lockbox,
uint256 _scale,

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

4 participants