chore: Counterfactuals v3 deployment - #1469
Open
tbwebb22 wants to merge 134 commits into
Open
Conversation
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
…isal/deploy-scripts
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
…isal/deploy-scripts
Signed-off-by: Ihor Farion <ihor@umaproject.org>
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
* feat: vanilla CCTP counterfactual deposit route
Adds `CounterfactualDepositVanillaCCTP`, a per-bridge implementation for the
upgradeable counterfactual system that bridges via Circle CCTP v2 directly
(`ITokenMessengerV2`) — no Across periphery — so USDC mints natively on the
destination. One branch on `hookData`:
- empty -> `depositForBurn` (plain CCTPv2; fast or standard via
`minFinalityThreshold` + `cctpMaxFeeBps`)
- present -> `depositForBurnWithHook` (HyperCore: burn to HyperEVM domain 19 with
`mintRecipient` = Circle's CctpForwarder and
an opaque hook envelope, routed on to
HyperCore via CoreDepositWallet)
`mintRecipient`/`destinationCaller`/`hookData` are opaque route-leaf params, so
the contract carries no HyperCore-specific logic. With no periphery quote sig,
the EIP-712 fee signature binds the route + amount + fee directly (mirroring the
SpokePool impl); replay protection is the short `signatureDeadline`.
Adds Foundry coverage (plain CCTP, HyperCore hook, standard transfer, fee/sig/
expiry/source-chain/cross-proxy/amount/route-binding cases) and documents the
route + HyperCore wiring in DESIGN.md.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: drop unused sourceDomain from CounterfactualDepositVanillaCCTP
Per review (tbwebb22): the vanilla path calls ITokenMessengerV2.depositForBurn
directly, which infers the source domain from the deploy chain, so the
`sourceDomain` immutable is never read. Remove it and its constructor param.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Move every chain-specific value (bridge endpoints, CCTP domain / OFT EID, fee signer, token addresses) out of the leaf-implementation immutables and the merkle leaf params, and onto the per-chain CounterfactualBeacon as public immutables. Leaf implementations resolve the beacon from the proxy's ERC-1967 beacon slot (CounterfactualImplementationBase) and read what they need at runtime; the input token is fixed per implementation. Result: leaf implementations are byte-identical across chains (one CREATE2 address everywhere) and a single leaf is valid on every chain, so initialRoot carries one leaf per route instead of one per source chain. Drops sourceChainId and the SourceChainMismatch check; an unconfigured route reverts RouteNotConfigured. - CounterfactualBeacon: add immutable chain config (CounterfactualChainConfig) with named getters (signer, spokePool, wrappedNativeToken, cctp*, oft*, usdc, usdt); implementation/upgradeRoot stay mutable. Config changes are UUPS upgrades. - CounterfactualBeaconBootstrap: chain-identical no-arg UUPS impl so the beacon proxy deploys to the same address on every chain (bootstrap -> upgrade). - SpokePool impl is now abstract with per-token variants (Usdc, Native) and a distinct EIP-712 domain name each, preventing cross-variant signature replay. Tron variant resolves USDT. - Signer read from beacon.signer() (rotatable via beacon upgrade). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…to taylor/counterfactual-nonces-deploy
…n-agnostic-deploy-cctp-fix
Brings in the new SponsoredCCTP/OFT periphery deployments (incl. Arc
SponsoredCCTPSrcPeriphery) so counterfactual redeploys resolve the new
periphery addresses. deployed-addresses.{json,md} regenerated from the
merged broadcast receipts via yarn extract-addresses.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note that Across is removing support for the chains below, and will therefore not be supporting PDAs on them. So there are some deleted broadcast files for these chains:
232 Lens
1135 Lisk
1868 Soneium
34443 Mode
81457 Blast
7777777 Zora
Two addresses are hardcoded into src/consts.ts, these can be temporary. PR to add these to the constants repo here:
across-protocol/constants#221
Updated sponsored bridging contract deployments were merged in from this PR:
#1436
Note that the DstOFTHandler roles still need to be transferred from the dev wallet on these
This also includes the changes from the recent audit to add signature nonces to
AdminWithdrawManager,CounterfactualDepositSpokePool, andCounterfactualDepositVanillaCCTPFor checking deployed configurations, I recommend running:
Counterfactuals roles should all be transferred to multisigs:
owneron theBeaconowneronAdminWithdrawManagerdirectWithdraweronAdminWithdrawManager