deploy_multichain_lagoon_vault

Documentation for eth_defi.erc_4626.vault_protocol.lagoon.deployment.deploy_multichain_lagoon_vault function.

deploy_multichain_lagoon_vault(*, chain_web3, deployer, chain_configs, max_workers=None)

Deploy Lagoon vaults across multiple chains with a shared deterministic Safe.

Uses CREATE2 via the canonical Safe v1.4.1 ProxyFactory to produce the same Safe address on every chain. Each chain gets its own vault and guard deployment, but all vaults share the same Safe multisig address.

Deploys all chains in parallel using threads to minimise wall-clock time.

Each chain receives its own LagoonConfig with chain-specific whitelisting (ERC-4626 vaults, Hypercore vaults, CCTP, CowSwap, etc.). All configs must share the same safe_salt_nonce to ensure deterministic Safe addresses.

Parameters
  • chain_web3 (dict[str, web3.main.Web3]) – Mapping of chain names (lowercase, matching eth_defi.chain.CHAIN_NAMES) to Web3 instances. Example: {"ethereum": w3_eth, "arbitrum": w3_arb}.

  • deployer (eth_account.signers.local.LocalAccount) – The deployer account. A separate HotWallet is created per chain for nonce management.

  • chain_configs (dict[str, eth_defi.erc_4626.vault_protocol.lagoon.deployment.LagoonConfig]) – Per-chain LagoonConfig instances. Keys must match chain_web3 keys. All configs must have the same safe_salt_nonce set. The parameters.underlying field is auto-resolved per chain from eth_defi.token.USDC_NATIVE_TOKEN if set to a zero/empty address.

  • max_workers (Optional[int]) – Maximum number of parallel deployment threads. Defaults to the number of chains.

Returns

LagoonMultichainDeployment with per-chain results.

Return type

eth_defi.erc_4626.vault_protocol.lagoon.deployment.LagoonMultichainDeployment