Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
f8da8cd
refactor: Remove ValueTransferBridge (#6605)
larryob Jun 26, 2025
826e837
fix: CCTP burn message sender patch (#6632)
yorhodes Jun 27, 2025
9a43cdc
fix: Fix absolute imports (#6661)
larryob Jul 1, 2025
719f513
Disable registry warp ID check
yorhodes Jul 7, 2025
737ea2b
feat: emit event on protocol fee payment (#6688)
yorhodes Jul 7, 2025
e0c69e2
feat: token bridge fees (#6562)
yorhodes Jul 7, 2025
205bcae
fix: rebalance undercollateralization (#6588)
yorhodes Jul 7, 2025
f478685
feat: Add Everclear TokenBridge (#6625)
larryob Jul 8, 2025
dd16e3d
feat: collateral LP interface (#6589)
yorhodes Jul 8, 2025
8ff74bb
refactor: Add internal init function to HypERC20Collateral (#6675)
larryob Jul 9, 2025
7997516
feat: extend CCTP with hook and ISM interface (#6687)
yorhodes Jul 12, 2025
2c65067
feat: support CCTP v2 fast transfers (#6709)
yorhodes Jul 14, 2025
80f0199
feat: Add Everclear bridge for native ETH (#6720)
larryob Jul 15, 2025
7a41068
fix: cctp v2 burn amount (#6748)
yorhodes Jul 18, 2025
b634235
chore: Remove old Liquidity layer code (#6829)
nambrot Sep 19, 2025
9fef23d
fix: storage layout compatibility (#7078)
yorhodes Sep 23, 2025
5b17b0f
refactor: Send funds directly to recipient for ERC20 intents (#6750)
larryob Sep 24, 2025
53a268d
fix: Use per destination fees for Everclear bridge (#7091)
larryob Sep 30, 2025
d33495a
fix: Use intent data for validation when sending ETH (#7121)
larryob Sep 30, 2025
18c32ed
chore: refactor warp route inheritance tree (#7064)
yorhodes Sep 30, 2025
1d46a82
test: lint for functions that are virtual and override (#7086)
yorhodes Oct 2, 2025
435b5db
fix: enable native LP deposits with payable overload (#7147)
yorhodes Oct 10, 2025
a58c170
Fix fork tests
yorhodes Oct 10, 2025
99dff0f
chore: improve progressive fee comments and test coverage (#7153)
yorhodes Oct 10, 2025
f073cd8
fix: use `previewWithdraw(assetsDeposited)` for excess shares (#7152)
yorhodes Oct 13, 2025
f73c711
fix: SentTransferRemote should reflect scaled amount in message (#7155)
yorhodes Oct 13, 2025
867997d
fix: prevent setting fee recipient to self (#7154)
yorhodes Oct 13, 2025
a62b662
fix: CCTP v2 external fee quoting (#7148)
yorhodes Oct 13, 2025
e7e9cd8
fix: prevent CCTP v2 nonce manipulation (#7209)
yorhodes Oct 20, 2025
4a0f777
fix: Use new address for `BOB` in Everclear test (#7215)
larryob Oct 21, 2025
bf7546b
fix: do not donate on receive in `HypNative` (#7262)
yorhodes Oct 28, 2025
3fc7383
fix: prevent token message verifying GMP recipient (#7261)
yorhodes Oct 28, 2025
0faa783
fix: minimize CCTP bytecode size (#7265)
yorhodes Oct 28, 2025
7c1fc0c
Fix lint
yorhodes Oct 28, 2025
7f5656b
fix: override transfer to with transfer fee behavior (#7264)
yorhodes Oct 28, 2025
f930794
feat: Import and use safeApprove for yield routes (#7243)
ltyu Oct 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/angry-pandas-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperlane-xyz/core": patch
---

Fix CCTP v2 transferRemote amount
15 changes: 15 additions & 0 deletions .changeset/big-papayas-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"@hyperlane-xyz/core": major
---

Refactor warp route contracts for shallower inheritance tree and smaller bytecode size.

Deprecated `Router` and `GasRouter` internal functions have been removed.

`FungibleTokenRouter` has been removed and functionality lifted into `TokenRouter`.

`quoteTransferRemote` and `transferRemote` can no longer be overriden with optional `hook` and `hookMetadata` for simplicity.

`quoteTransferRemote` returns a consistent shape of `[nativeMailboxDispatchFee, internalTokenFee, externalTokenFee]`.

`HypNative` and `HypERC20Collateral` inherit from `MovableCollateral` and `LpCollateral` but other extensions (eg `HypXERC20`) do not. Storage layouts have been preserved to ensure upgrade compatibility.
5 changes: 5 additions & 0 deletions .changeset/brown-scissors-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperlane-xyz/core": patch
---

Rebalancer covers all fees associated with rebalancing
5 changes: 5 additions & 0 deletions .changeset/clever-carpets-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperlane-xyz/core": patch
---

Remove ValueTransferBridge and use ITokenBridge. ValueTransferBridge is a deprecated name for the interface.
5 changes: 5 additions & 0 deletions .changeset/gold-islands-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperlane-xyz/core": minor
---

Add Everclear bridges for ETH and ERC20 tokens.
5 changes: 5 additions & 0 deletions .changeset/light-years-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperlane-xyz/core": minor
---

Implement support for CCTP v2 fast transfers
5 changes: 5 additions & 0 deletions .changeset/many-stingrays-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperlane-xyz/core": patch
---

Remove majority of virtual override functions
5 changes: 5 additions & 0 deletions .changeset/mean-pigs-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperlane-xyz/helloworld": patch
---

Update HelloWorld to use new Router utils
5 changes: 5 additions & 0 deletions .changeset/nice-crabs-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperlane-xyz/core": minor
---

Extend CCTP TokenBridge with GMP support via hook
5 changes: 5 additions & 0 deletions .changeset/odd-carrots-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperlane-xyz/core": patch
---

Fix TokenBridgeCCTP.verify burn message sender enforcement
10 changes: 10 additions & 0 deletions .changeset/red-moose-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@hyperlane-xyz/core": minor
"@hyperlane-xyz/sdk": patch
---

Implement token fees on FungibleTokenRouter

Removes `metadata` from return type of internal `TokenRouter._transferFromSender` hook

To append `metadata` to `TokenMessage`, override the `TokenRouter._beforeDispatch` hook
5 changes: 5 additions & 0 deletions .changeset/rude-apricots-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperlane-xyz/core": minor
---

feat: emit event on protocol fee payment
6 changes: 6 additions & 0 deletions .changeset/sharp-clouds-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@hyperlane-xyz/sdk": minor
"@hyperlane-xyz/cli": patch
---

Decouple movable collateral and hyp collateral token adapters
5 changes: 5 additions & 0 deletions .changeset/short-yaks-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperlane-xyz/core": minor
---

Adds fees to FungibleTokenRouter
9 changes: 9 additions & 0 deletions .changeset/stale-baboons-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@hyperlane-xyz/core': major
---

Add LP interface to collateral routers

The `balanceOf` function has been removed from `TokenRouter` to remove ambiguity between `LpCollateralRouter.balanceOf`.

To migrate, use the new `TokenRouter.token()` to get an `IERC20` or `IERC721` compliant address that you can call `balanceOf` on.
5 changes: 5 additions & 0 deletions .changeset/sweet-tips-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperlane-xyz/core": patch
---

Update Yield Routes (HypERC4626OwnerCollateral and HypERC4626Collateral) to use safeApprove
5 changes: 5 additions & 0 deletions .changeset/wise-steaks-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperlane-xyz/core": patch
---

Remove absolute imports. Fixes compilation for users who import from files under `solidity/contracts`.
26 changes: 22 additions & 4 deletions .github/workflows/storage-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Check Storage Layout Changes

on:
pull_request:
branches: [main]
branches:
- '*'
paths:
- 'solidity/**'
workflow_dispatch:
Expand Down Expand Up @@ -53,13 +54,30 @@ jobs:
env:
BASE_REF: ${{ github.event.inputs.base || github.event.pull_request.base.sha }}
run: |
# Fetch the base reference
git fetch origin $BASE_REF
git checkout $BASE_REF -- solidity/contracts
# Check if BASE_REF is a commit SHA (40 hex characters) or a branch name
if [[ "$BASE_REF" =~ ^[0-9a-f]{40}$ ]]; then
# For commit SHAs, checkout directly without origin/ prefix
git checkout $BASE_REF -- solidity/contracts
else
# For branch names, use origin/ prefix
git checkout origin/$BASE_REF -- solidity/contracts
fi

# Run the command on the target branch
- name: Run command on target branch
run: yarn workspace @hyperlane-xyz/core storage base-storage

# Compare outputs
- name: Compare outputs
run: diff --unified solidity/base-storage solidity/HEAD-storage
- name: Compare outputs (fail on removals only)
run: |
DIFF_OUTPUT=$(diff --unified solidity/base-storage solidity/HEAD-storage || true)
echo "$DIFF_OUTPUT"
# Fail only if there are removal lines in diff hunks (lines starting with '-' but not '---')
if echo "$DIFF_OUTPUT" | grep -E '^-([^-])' >/dev/null; then
echo "Detected storage removals in diff. Failing job."
exit 1
else
echo "No storage removals detected."
fi
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"postinstall": "husky install"
},
"workspaces": [
"solhint-plugin",
"solidity",
"typescript/*",
"starknet"
Expand Down
48 changes: 48 additions & 0 deletions solhint-plugin/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// https://protofire.github.io/solhint/docs/writing-plugins.html
class NoVirtualOverrideAllowed {
constructor(reporter, config) {
this.ruleId = 'no-virtual-override';

this.reporter = reporter;
this.config = config;
}

FunctionDefinition(ctx) {
const isVirtual = ctx.isVirtual;
const hasOverride = ctx.override !== null;

if (isVirtual && hasOverride) {
this.reporter.error(
ctx,
this.ruleId,
'Functions cannot be "virtual" and "override" at the same time',
);
}
}
}

class NoVirtualInitializerAllowed {
constructor(reporter, config) {
this.ruleId = 'no-virtual-initializer';

this.reporter = reporter;
this.config = config;
}

FunctionDefinition(ctx) {
const isVirtual = ctx.isVirtual;
const hasInitializer = ctx.modifiers.some(
(modifier) => modifier.name === 'initializer',
);

if (isVirtual && hasInitializer) {
this.reporter.error(
ctx,
this.ruleId,
'Functions cannot be "virtual" and "initializer" at the same time',
);
}
}
}

module.exports = [NoVirtualOverrideAllowed, NoVirtualInitializerAllowed];
9 changes: 9 additions & 0 deletions solhint-plugin/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "solhint-plugin-hyperlane",
"private": true,
"version": "0.0.0",
"description": "",
"license": "Apache-2.0",
"type": "commonjs",
"main": "index.js"
}
1 change: 1 addition & 0 deletions solidity/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ docs
flattened/
buildArtifact.json
fixtures/
broadcast/
# ZKSync
artifacts-zk
cache-zk
Expand Down
6 changes: 4 additions & 2 deletions solidity/.solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"reason-string": ["warn", { "maxLength": 64 }],
"prettier/prettier": "error",
"gas-custom-errors": "off",
"named-parameters-mapping": "error"
"named-parameters-mapping": "error",
"hyperlane/no-virtual-override": "error",
"hyperlane/no-virtual-initializer": "error"
},
"plugins": ["prettier"]
"plugins": ["prettier", "hyperlane"]
}
2 changes: 1 addition & 1 deletion solidity/contracts/AttributeCheckpointFraud.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

import {PackageVersioned} from "contracts/PackageVersioned.sol";
import {PackageVersioned} from "./PackageVersioned.sol";
import {TREE_DEPTH} from "./libs/Merkle.sol";
import {CheckpointLib, Checkpoint} from "./libs/CheckpointLib.sol";
import {CheckpointFraudProofs} from "./CheckpointFraudProofs.sol";
Expand Down
6 changes: 2 additions & 4 deletions solidity/contracts/avs/HyperlaneServiceManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {IAVSDirectory} from "../interfaces/avs/vendored/IAVSDirectory.sol";
import {IRemoteChallenger} from "../interfaces/avs/IRemoteChallenger.sol";
import {ISlasher} from "../interfaces/avs/vendored/ISlasher.sol";
import {ECDSAServiceManagerBase} from "./ECDSAServiceManagerBase.sol";
import {PackageVersioned} from "contracts/PackageVersioned.sol";
import {PackageVersioned} from "../PackageVersioned.sol";

contract HyperlaneServiceManager is ECDSAServiceManagerBase, PackageVersioned {
// ============ Libraries ============
Expand Down Expand Up @@ -286,9 +286,7 @@ contract HyperlaneServiceManager is ECDSAServiceManagerBase, PackageVersioned {
}

/// @inheritdoc ECDSAServiceManagerBase
function _deregisterOperatorFromAVS(
address operator
) internal virtual override {
function _deregisterOperatorFromAVS(address operator) internal override {
address[] memory challengers = getOperatorChallengers(operator);
_completeUnenrollment(operator, challengers);

Expand Down
38 changes: 7 additions & 31 deletions solidity/contracts/client/GasRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ abstract contract GasRouter is Router {
function quoteGasPayment(
uint32 _destinationDomain
) public view virtual returns (uint256) {
return _GasRouter_quoteDispatch(_destinationDomain, "", address(hook));
return
_Router_quoteDispatch(
_destinationDomain,
"",
_GasRouter_hookMetadata(_destinationDomain),
address(hook)
);
}

function _GasRouter_hookMetadata(
Expand All @@ -73,34 +79,4 @@ abstract contract GasRouter is Router {
destinationGas[domain] = gas;
emit GasSet(domain, gas);
}

function _GasRouter_dispatch(
uint32 _destination,
uint256 _value,
bytes memory _messageBody,
address _hook
) internal returns (bytes32) {
return
_Router_dispatch(
_destination,
_value,
_messageBody,
_GasRouter_hookMetadata(_destination),
_hook
);
}

function _GasRouter_quoteDispatch(
uint32 _destination,
bytes memory _messageBody,
address _hook
) internal view returns (uint256) {
return
_Router_quoteDispatch(
_destination,
_messageBody,
_GasRouter_hookMetadata(_destination),
_hook
);
}
}
Loading
Loading