calculate_deterministic_safe_address

Documentation for eth_defi.safe.deployment.calculate_deterministic_safe_address function.

calculate_deterministic_safe_address(web3, owners, threshold, salt_nonce, master_copy_address='0x29fcB43b46531BcA003ddC8FCB67FFE91900C762', proxy_factory_address='0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67')

Pre-compute the deterministic Safe address without deploying.

Uses the same CREATE2 formula as deploy_safe_with_deterministic_address() to predict the Safe proxy address before deployment. The address depends only on the owner list, threshold, salt nonce, master copy, and proxy factory — all of which are the same on every EVM chain, enabling cross-chain address prediction.

Parameters
  • owners (list[Union[eth_typing.evm.HexAddress, str]]) – List of owner addresses. Must be in the same order across chains.

  • threshold (int) – Number of required confirmations.

  • salt_nonce (int) – Uint256 salt for CREATE2. Use the same value across chains for the same address.

  • master_copy_address (Union[eth_typing.evm.HexAddress, str]) – Safe singleton address. Default is Safe v1.4.1 L2.

  • proxy_factory_address (Union[eth_typing.evm.HexAddress, str]) – Safe ProxyFactory address. Default is the canonical v1.4.1 factory.

  • web3 (web3.main.Web3) –

Returns

The predicted Safe proxy address.

Return type

eth_typing.evm.HexAddress