safe.deployment

Documentation for eth_defi.safe.deployment Python module.

Deploy Safe multisig wallets.

  • Helpers for deploying Safe, managing owners and modifying the deployment

Safe source code:

Functions

add_new_safe_owners(web3, safe, deployer, ...)

Update Safe owners and threshold list.

deploy_safe(web3, deployer, owners, threshold)

Deploy a new Safe wallet.

disable_safe_module(web3, safe_address, ...)

Spoof Safe.disableModule() call on a forked mainnet.

fetch_safe_deployment(web3, address)

Wrap Safe contract as Safe Python proxy object

deploy_safe(web3, deployer, owners, threshold, master_copy_address='0x29fcB43b46531BcA003ddC8FCB67FFE91900C762', post_deploy_delay_seconds=10.0)

Deploy a new Safe wallet.

  • Use version Safe v 1.4.1

Parameters
Return type

safe_eth.safe.safe.Safe

add_new_safe_owners(web3, safe, deployer, owners, threshold, gas_per_tx=500000, gnosis_safe_state_safety_sleep=20)

Update Safe owners and threshold list.

  • Safe cannot replace the existing owner list

  • Designed to create the owner list after a deployment.

  • The multisig must be in 1-of-1 deployer state

Note

We cannot remove deployer account from the list, but it must be done by the new owners

Parameters

More info:

fetch_safe_deployment(web3, address)

Wrap Safe contract as Safe Python proxy object

Parameters
Return type

safe_eth.safe.safe.SafeV141

disable_safe_module(web3, safe_address, module_address)

Spoof Safe.disableModule() call on a forked mainnet.

  • Safe makes disable module transaction unnecessary complicated, because the internal linked list is exposed

Raises

ValueError – Module is not enabled.

Returns

Bound ContractFunction to call on the Safe contract.

Parameters
Return type

web3.contract.contract.ContractFunction