Skip to content

update UR briefcase initcode to v2.1.1#142

Closed
david-uniswap wants to merge 1 commit into
mainfrom
david-nick/regenerate-briefcase-ur-2.1.1
Closed

update UR briefcase initcode to v2.1.1#142
david-uniswap wants to merge 1 commit into
mainfrom
david-nick/regenerate-briefcase-ur-2.1.1

Conversation

@david-uniswap

@david-uniswap david-uniswap commented May 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

src/pkgs/universal-router is a git submodule. The briefcase hex literal in UniversalRouterDeployer.sol was last regenerated against an old submodule pin that predated the v2.1.1 commit (PR #470 upstream). The monorepo's submodule pin has since advanced past v2.1.1, but no one re-ran ./script/util/create_briefcase.sh, so deploys via the briefcase were silently shipping v2.1.0 bytecode.

This PR is scoped to a single line change: the hex literal in UniversalRouterDeployer.sol. Everything else the regen script touches (briefcase protocols/ source files, orphan hook scripts) is documentation/reference and can drift relative to the deployer without affecting any deployment — those follow-ups can ship separately when convenient.

Diff

src/briefcase/deployers/universal-router/UniversalRouterDeployer.sol | 2 +-

Bytecode diff

field old new
bytes 23,587 26,404
keccak 0x7171fed0bc0dd1a41b55969fe1ebdb60d3eeb80750c3fa8d7230ea06142db561 0x6dba80c0116a490d48657845492bb38374489ed49c296ac50614265f97221510

What v2.1.1 brings over v2.1.0

  • PAY_PORTION_FULL_PRECISION command (slot 0x07) with 1e18 precision
  • Per-hop slippage on v2/v3 swaps via minHopPriceX36
  • minHopPriceX36 field added to V4 ExactInputSingleParams struct
  • Expanded command space mask: 0x3f0x7f
  • v2 fee-on-transfer slippage fix (uses actual balance change)
  • OZ audit fixes m01, l03, n05, n08

Verification

  • forge build clean with the new deployer
  • New initcode keccak matches a fresh forge build of the current submodule pin's UniversalRouter source (so the briefcase faithfully reflects what the submodule produces)
  • Followed by Robinhood redeploy in deploy Universal Router 2.1.1 to Robinhood Chain (replaces #141) #143 — successfully deployed and Blockscout-verified UR v2.1.1 onchain at 0x8876789976decbfcbbbe364623c63652db8c0904

Test plan

src/pkgs/universal-router is a git submodule. The briefcase hex literal
in UniversalRouterDeployer.sol was last regenerated against an old
submodule pin that predated the v2.1.1 commit (PR #470 upstream). The
monorepo's submodule pin has since advanced past v2.1.1, but no one
re-ran ./script/util/create_briefcase.sh, so deploys via the briefcase
were silently shipping v2.1.0 bytecode.

This patch rewrites only the hex literal in UniversalRouterDeployer.sol
with the v2.1.1 bytecode. The briefcase protocols/ source reference
files are intentionally NOT touched in this PR — they're documentation
and can drift relative to the deployer without affecting deployments.
A follow-up can sync them when convenient.

Bytecode diff:
- Old size:     23,587 bytes
- New size:     26,404 bytes (~12% larger)
- Old keccak:   0x7171fed0bc0dd1a41b55969fe1ebdb60d3eeb80750c3fa8d7230ea06142db561
- New keccak:   0x6dba80c0116a490d48657845492bb38374489ed49c296ac50614265f97221510

v2.1.0 → v2.1.1 brings:
- PAY_PORTION_FULL_PRECISION command (slot 0x07) with 1e18 precision
- Per-hop slippage on v2/v3 swaps via minHopPriceX36
- minHopPriceX36 field on V4 ExactInputSingleParams struct
- Command space expanded (mask 0x3f → 0x7f)
- v2 fee-on-transfer slippage fix (uses actual balance change)
- OZ audit fixes m01, l03, n05, n08

Verification:
- forge build clean
- New initcode keccak matches a fresh forge compilation of the current
  submodule pin's UniversalRouter source.
@david-uniswap david-uniswap force-pushed the david-nick/regenerate-briefcase-ur-2.1.1 branch from 023196a to 435490f Compare May 26, 2026 22:51
@david-uniswap david-uniswap changed the title regenerate UR briefcase to ship v2.1.1 bytecode update UR briefcase initcode to v2.1.1 May 26, 2026
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.

1 participant