Files
proxmox/docs/03-deployment/TEZOS_BRIDGE_DEPLOYMENT.md
defiQUG bea1903ac9
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
Sync all local changes: docs, config, scripts, submodule refs, verification evidence
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-21 15:46:06 -08:00

6.9 KiB
Raw Blame History

Tezos Bridging Deployment Runbook

This runbook describes how to deploy and configure all possible bridging to the Tezos ecosystem: Etherlink (EVM chain 42793) and Tezos L1 (native Michelson).

Prerequisites (external verification)

Before implementation or production use:

  1. CCIP (Etherlink)

    • Check CCIP supported networks for Etherlink (chain 42793).
    • If supported: obtain the CCIP chain selector for 42793 and set it in alltra-lifi-settlement/src/config/chains.ts (ETHERLINK.selector) and set ccipSupported: true.
  2. LiFi (Etherlink)

    • Check LiFi API (e.g. https://li.quest/v1/chains) for chain 42793.
    • If present: set lifiSupported: true in alltra-lifi-settlement/src/config/chains.ts for ETHERLINK.
    • If not present: use the same request process as REQUESTING_CCIP_LIFI_SUPPORT.md for Etherlink.

A1. BridgeRegistry

  • No contract change. Destination is registered at runtime.
  • Action: After BridgeRegistry is deployed, ensure Etherlink is registered.
    Use InitializeRegistry.s.sol, which registers 42793 as "Etherlink Mainnet".
    If running initialization manually, call:
    • registerDestination(42793, "Etherlink Mainnet", minFinalityBlocks, timeoutSeconds, baseFee, feeRecipient).
  • When registering tokens (e.g. BRG-VLT, BRG-ISO), include 42793 in allowedDestinations (or use integration defaults that already include 42793).

A2. VaultBridgeIntegration / eMoneyBridgeIntegration / WTokenBridgeIntegration

A3. CCIP bridges (UniversalCCIPBridge, CCIPWETH9Bridge, CCIPWETH10Bridge)

  • Condition: Only if CCIP supports Etherlink (see Prerequisites).
  • Steps:
    1. Deploy receiver bridge contracts on Etherlink (same interfaces as on source chain).
    2. For each token and each bridge: call addDestination(token, etherlinkChainSelector, receiverBridgeOnEtherlink).
  • Reference: DeployWETHBridges.s.sol, execute-bridge-config.sh.
  • Script: DeployAllAdapters.s.sol already deploys an EVM adapter for Etherlink and registers chain 42793.
  • Env: UNIVERSAL_BRIDGE_ADDRESS, CHAIN_REGISTRY_ADDRESS, PRIVATE_KEY.
  • Run: forge script script/deploy/chains/DeployAllAdapters.s.sol --rpc-url <RPC> --broadcast (from smom-dbis-138).

A5. LiFi / alltra-lifi-settlement

  • Config: chains.ts includes an ETHERLINK entry (chainId 42793, rpcUrl, explorerUrl, nativeCurrency from eip155-42793). Set selector, usdcAddress, ccipSupported, lifiSupported after Prerequisites verification.
  • Docs: CHAIN_SUPPORT.md includes Etherlink in the support matrix and verification section.

A6. BRG scripts and token registration

  • Scripts: register-vault-deposit-tokens.sh, register-iso-deposit-tokens.sh document that 42793 (Etherlink) and 1 (Tezos L1) should be included in allowedDestinations when registering tokens.
  • Default destinations: New deployments of VaultBridgeIntegration / eMoneyBridgeIntegration / WTokenBridgeIntegration already include 42793; registerDepositTokenDefault / registereMoneyTokenDefault / registerWTokenDefault will include Etherlink.

Part B: Tezos L1 (native Michelson)

B1. TezosAdapter

  • Contract: TezosAdapter.sol
    Implements IChainAdapter: lock tokens, emit TezosBridgeInitiated; oracle calls confirmTransaction(requestId, tezosTxHash) when Tezos tx is confirmed.

B2/B4. ChainRegistry and BridgeRegistry

  • ChainRegistry: Tezos L1 is registered via DeployAllAdapters.s.sol as registerNonEVMChain("Tezos-Mainnet", ChainType.Other, tezosAdapter, "https://tzkt.io", ...).
  • BridgeRegistry: InitializeRegistry.s.sol registers Tezos-Mainnet with chainId 1 (non-EVM slot). For tokens that may bridge to Tezos L1, include 1 in allowedDestinations.

B3. Deploy TezosAdapter and register

B5. Tezos-side relay

  • Runbook: TEZOS_L1_RELAY_RUNBOOK.md describes:
    • TezosAdapter event schema (TezosBridgeInitiated)
    • Relay flow: watch events → perform Tezos-side mint/transfer → call confirmTransaction
    • ORACLE_ROLE usage and security notes.

Implementation order

  1. Prerequisites: Verify CCIP and LiFi for Etherlink (42793); record selectors and flags in chains.ts and CHAIN_SUPPORT.md.
  2. Etherlink: A1 (BridgeRegistry via InitializeRegistry) and A2 (integrations already include 42793) → A4 (DeployAllAdapters) → A5 (LiFi config/docs) → A3 if CCIP supports Etherlink → A6 (BRG scripts/docs).
  3. Tezos L1: B1 (TezosAdapter exists) → B2/B4 (BridgeRegistry destination 1 in InitializeRegistry) → B3 (DeployAllAdapters) → B5 (relay runbook).
  4. Doc: This runbook; update after Prerequisites verification.

References