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. Every chain gets a distinct Safe contract and guard module at matching addresses. Non-satellite chains additionally get a Lagoon vault paired with that chain’s Safe.
Deploys all chains in parallel using threads to minimise wall-clock time.
Each chain receives its own
LagoonConfigwith chain-specific whitelisting (ERC-4626 vaults, Hypercore vaults, CCTP, CowSwap, etc.) and an optional chain-specific Lagoon settlement safety policy. All configs must share the samesafe_salt_nonceto ensure deterministic Safe addresses.LagoonConfig.max_settlement_amountand its cooldown are forwarded to the public single-chain deployment API and is converted using that chain’s underlying token decimals. Configure it only for chains which deploy or reuse a Lagoon vault. Satellite chains contain only a Safe and guard module and therefore reject settlement-safety configuration instead of silently ignoring it.- 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
HotWalletis created per chain for nonce management.chain_configs (dict[str, eth_defi.erc_4626.vault_protocol.lagoon.deployment.LagoonConfig]) – Per-chain
LagoonConfiginstances. Keys must matchchain_web3keys. All configs must have the samesafe_salt_nonceset. Theparameters.underlyingfield is auto-resolved per chain frometh_defi.token.USDC_NATIVE_TOKENif set to a zero/empty address. Setmax_settlement_amountindependently on each non-satellite config to enable the atomic gross-settlement cap and cooldown safety feature for that chain’s Lagoon vault.max_workers (Optional[int]) – Maximum number of parallel deployment threads. Defaults to the number of chains.
- Returns
LagoonMultichainDeploymentwith per-chain results.- Return type
eth_defi.erc_4626.vault_protocol.lagoon.deployment.LagoonMultichainDeployment