Skip to content

feat(script): add HyperEVM (999) deploy parameters - #517

Merged
david-uniswap merged 1 commit into
mainfrom
david/hyperevm-deploy-params
Sep 22, 2026
Merged

david-uniswap merged 1 commit into
mainfrom
david/hyperevm-deploy-params

Conversation

@david-uniswap

@david-uniswap david-uniswap commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Adds script/deployParameters/DeployHyperEVM.s.sol, the parameters used for the 2.2.0 router on HyperEVM (chain 999):

  • Router: 0x9aFe3C497e19501DB228F28CdBdD29bC98F65DBa, deployed 2026-09-18 at tag 2.2.0 (64027f3), tx 0xd9eda6c9…244f34, verified on hyperevmscan and Sourcify.
  • Across SpokePool 0x35E6…0E04 and PermissionsAdapterFactory 0x2a90…f803 wired; reuses the existing UnsupportedProtocol 0xEEE3…4BcF.
  • All addresses from Uniswap/contracts deployments/json/999.json (feat: deploy Uniswap to HyperEVM (999) contracts#164).

Recorded so the canonical HyperEVM router is reproducible from this repo, per review on contracts#164.

🤖 Generated with Claude Code

AI-Generated Description
AI-Generated Description ## What Adds deploy parameters for HyperEVM mainnet (chain ID 999) to support the 2.2.0 Universal Router deployment. ## Changes - **`script/deployParameters/DeployHyperEVM.s.sol`**: New deploy parameter script for HyperEVM with all contract addresses sourced from Uniswap/contracts `deployments/json/999.json` - Permit2, WHYPE (wrapped native), V2/V3 factories, V4 PoolManager, PositionManagers - Across SpokePool `0x35E6…0E04` and PermissionsAdapterFactory `0x2a90…f803` wired - Reuses existing UnsupportedProtocol `0xEEE3…4BcF` (deployed alongside the 2.1.2 router) ## Notes - No contract code changes — deploy parameters only - Router `0x9aFe3C497e19501DB228F28CdBdD29bC98F65DBa` deployed 2026-09-18 at tag `2.2.0` (`64027f3`), verified on hyperevmscan and Sourcify - All addresses confirmed against Uniswap/contracts#164

Used for the 2.2.0 deployment at 0x9aFe3C497e19501DB228F28CdBdD29bC98F65DBa on 2026-09-18
(tx 0xd9eda6c912e49c0ce7e15bfd7a6d5dc91de796cc08231aec80df191341244f34), built at tag 2.2.0 (64027f3).
Across SpokePool and PermissionsAdapterFactory wired; reuses the UnsupportedProtocol at 0xEEE3…4BcF.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@david-uniswap
david-uniswap marked this pull request as ready for review September 21, 2026 16:34
@david-uniswap
david-uniswap requested a review from a team as a code owner September 21, 2026 16:34
@david-uniswap
david-uniswap merged commit b67f125 into main Sep 22, 2026
8 checks passed
@david-uniswap
david-uniswap deleted the david/hyperevm-deploy-params branch September 22, 2026 20:57
dianakocsis added a commit that referenced this pull request Sep 22, 2026
* revert: undo #491 and #497 input-bounding and nested-unlock changes (#514)

* revert: bound router command input decoding (#497)

Reverts d203e7f.

This change was deployed to mainnet at 0x0542093271A31f6FC1DADB232bd59eeb27de780F
but was never intended to ship. Removes the checkInputLength calldata bounds
checks, the BytesLib hardening, the SWEEP uint160 truncation fix, the
UNWRAP_WETH_EXACT command (0x0f), and unwrapWETH9Exact.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* revert: allow V4_SWAP within an existing PoolManager unlock (#491)

Reverts 9e9a780.

This change was deployed to mainnet at 0x0542093271A31f6FC1DADB232bd59eeb27de780F
but was never intended to ship. It is the root cause of audit finding M-01:
V4 deltas accrue under the router regardless of which contract called execute(),
so within one foreign unlock, one call can leave debt that a later call settles
from a different msgSender().

Removing the fast path restores the pre-#491 behaviour: a nested V4_SWAP reverts
with AlreadyUnlocked. This supersedes #502, #512 and #513, which existed only to
gate the fast path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* chore: regenerate UniversalRouter bytecode size snapshot

23705 -> 23303 after reverting #491 and #497.

The hardhat gas snapshots under test/integration-tests/gas-tests/__snapshots__/
are deliberately left untouched: they require a mainnet fork (FORK_URL, block
20010000) to regenerate and cannot be derived by hand. They must be regenerated
with 'UPDATE_SNAPSHOT=1 yarn test:hardhat --grep gas' before this merges.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* chore: regenerate hardhat gas snapshots after reverting #491 and #497

65 snapshots updated across 5 suites. One snapshot removed:
'UNWRAP_WETH_EXACT partial amount', whose command (0x0f) no longer exists
after the #497 revert.

Regenerated with UPDATE_SNAPSHOT=1 against a mainnet fork at block 20010000.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* build: bump v4-periphery to main with the #584 revert

Moves lib/v4-periphery 07336f2 -> a7af5b3, which is v4-periphery main after
#601 merged (revert of #584, tolerate hook-funded input on exact-output swaps).

#564's exact-output partial-fill revert is retained; the only src/ change
against the previous pin is V4Router.sol (+4/-23).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* chore: regenerate bytecode snapshot after v4-periphery bump

23303 -> 23233. Hardhat gas snapshots unchanged: the #584 revert only removes
hook-funded exact-output paths, which the gas suite does not exercise.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

* chore: record 2.1.2 deployment addresses (#516)

* chore: record 2.1.2 deployment addresses

Record the UniversalRouter 2.1.2 addresses deployed across all 24 chains.

Every address was verified onchain before recording: 24,380-byte runtime,
all ten constructor parameters matching the deploy script, immutables
embedded in the deployed bytecode, and source verified (Etherscan V2 where
available, Sourcify otherwise; Tempo on its own Sourcify instance).

Four chains additionally record an UnsupportedProtocolV2_1_2 entry. Their
deploy scripts left `unsupported` unset, so the script deployed a throwaway
revert stub first, which consumed a nonce and shifted the router address.
Recording it explains why those routers do not share an address with the
rest of their nonce group.

arc.json, megaeth.json and robinhood.json are new; these chains had never
been recorded. Their pre-existing routers were read from the SDK and
confirmed onchain before being included.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(script): point base-sepolia and unichain-sepolia at live v4 deployments

Both scripts referenced PoolManager and PositionManager addresses that have
no recent onchain activity. A router deployed against them cannot execute
any v4 command.

Confirmed by log activity rather than by documentation, which has been
unreliable here. On Base Sepolia the previous PoolManager
(0xf7F5aB3D) has produced no logs in the last 50k blocks, while
0x05E73354 is actively emitting. The same holds on Unichain Sepolia for
0x9cB26A71 versus 0x00B036B5.

Sepolia needed no change; it was corrected on main in 020e1b7.

These addresses are what UniversalRouter 2.1.2 was actually deployed with
on both chains, so main's scripts now describe what is live.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* chore(script): add arc, megaeth and robinhood params; fill in unsupported

Two gaps surfaced while deploying 2.1.2.

Ink, Unichain, Worldchain and Zora left `unsupported` unset, so each deploy
created a fresh UnsupportedProtocol stub before the router. That consumed a
nonce and shifted the router off the address its nonce group would
otherwise share, and left an orphaned stub that nothing references. Filling
in the stubs deployed during 2.1.2 stops the next deploy repeating it. Each
address was confirmed onchain to be a 60-byte contract that reverts with
UnsupportedProtocolError.

Arc, MegaETH and Robinhood had no deploy parameters on main at all; they
were added on release/2.1.x and never ported. Without them a deploy from
main silently skips those chains. Ported with permissionsAdapterFactory
added to match the RouterParameters shape on main.

All 24 chains' parameters now match the constructor arguments of the
routers actually deployed onchain.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* style: fix forge fmt violation in PermissionedV4 test

Pre-existing on main and unrelated to this branch, but it fails
`yarn lint:check` and so would show a red CI run on any PR.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Revert "style: fix forge fmt violation in PermissionedV4 test"

This reverts commit 8ec8ca8.

* chore: drop the mislabelled 2.1.1 entry for megaeth

0x47837eb80db5908eabba9105626d9b348bea7b02 was recorded as
UniversalRouterV2_1_1, taken from universal-router-sdk's CHAIN_CONFIGS. It
cannot be 2.1.1: it was deployed 2026-01-30, and tag 2.1.1 was not cut until
2026-05-22.

It is on the 2.1 line — SPOKE_POOL() resolves, which the 2.0 router on that
chain does not — but at 21,738 bytes it is well short of 2.1.1's 24,546,
consistent with a build predating the per-hop slippage work. The 2.1.1 release
notes warn about exactly this: "Do not identify existing 2.1.0 bytecode as
2.1.1." There is no 2.1.0 tag to bytecode-match against, so rather than invent
a label the entry is dropped.

UniversalRouterV2 (0x48fd0352...) is kept: verified on Etherscan as
UniversalRouter, no SPOKE_POOL(), and 19,499 bytes matching the 2.0 routers on
ink, tempo, unichain and zora.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

* feat(script): add HyperEVM (999) deploy parameters (#517)

Used for the 2.2.0 deployment at 0x9aFe3C497e19501DB228F28CdBdD29bC98F65DBa on 2026-09-18
(tx 0xd9eda6c912e49c0ce7e15bfd7a6d5dc91de796cc08231aec80df191341244f34), built at tag 2.2.0 (64027f3).
Across SpokePool and PermissionsAdapterFactory wired; reuses the UnsupportedProtocol at 0xEEE3…4BcF.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: David <274080779+david-uniswap@users.noreply.github.com>
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.

2 participants