Skip to content

chore: Counterfactuals v3 deployment - #1469

Open
tbwebb22 wants to merge 134 commits into
masterfrom
taylor/counterfactual-chain-agnostic-deploy-cctp-fix
Open

chore: Counterfactuals v3 deployment#1469
tbwebb22 wants to merge 134 commits into
masterfrom
taylor/counterfactual-chain-agnostic-deploy-cctp-fix

Conversation

@tbwebb22

@tbwebb22 tbwebb22 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

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, and CounterfactualDepositVanillaCCTP

For checking deployed configurations, I recommend running:

source .env
FOUNDRY_PROFILE=counterfactual forge script \
  script/counterfactual/CheckCounterfactualDeployments.s.sol:CheckCounterfactualDeployments \
  --rpc-url $NODE_URL_1 --ffi --gas-limit 100000000000 -vv

Counterfactuals roles should all be transferred to multisigs:

  • owner on the Beacon
  • owner on AdminWithdrawManager
  • directWithdrawer on AdminWithdrawManager

fusmanii and others added 30 commits May 19, 2026 17:17
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>
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
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>
tbwebb22 and others added 13 commits July 16, 2026 19:20
…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>
@tbwebb22 tbwebb22 changed the title chore: counterfactual chain agnostic deploy chore: Counterfactuals v3 deployment Jul 20, 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.

5 participants