def __init__(self, w3: Web3, owners: List[str], threshold: int, signature_s: int, master_copy: str,<EOL>gas_price: int, funder: Optional[str], payment_token: Optional[str] = None,<EOL>payment_token_eth_value: float = <NUM_LIT:1.0>, fixed_creation_cost: Optional[int] = None):
assert <NUM_LIT:0> < threshold <= len(owners)<EOL>funder = funder or NULL_ADDRESS<EOL>payment_token = payment_token or NULL_ADDRESS<EOL>assert Web3.isChecksumAddress(master_copy)<EOL>assert Web3.isChecksumAddress(funder)<EOL>assert Web3.isChecksumAddress(payment_token)<EOL>self.w3 = w3<EOL>self.owners = owners<EOL>self.threshold = threshold<EOL>self.s = signature_s<EOL>self.master_copy = master_copy<EOL>self.gas_price = gas_price<EOL>self.funder = funder<EOL>self.payment_token = payment_token<EOL>self.payment_token_eth_value = payment_token_eth_value<EOL>self.fixed_creation_cost = fixed_creation_cost<EOL>safe_setup_data: bytes = self._get_initial_setup_safe_data(owners, threshold)<EOL>calculated_gas: int = self._calculate_gas(owners, safe_setup_data, payment_token)<EOL>estimated_gas: int = self._estimate_gas(master_copy, safe_setup_data, funder, payment_token)<EOL>self.gas = max(calculated_gas, estimated_gas)<EOL>self.payment = self._calculate_refund_payment(self.gas,<EOL>gas_price,<EOL>fixed_creation_cost,<EOL>payment_token_eth_value)<EOL>self.tx_dict: Dict[str, any] = self._build_proxy_contract_creation_tx(master_copy=master_copy,<EOL>initializer=safe_setup_data,<EOL>funder=funder,<EOL>payment_token=payment_token,<EOL>payment=self.payment,<EOL>gas=self.gas,<EOL>gas_price=gas_price)<EOL>self.tx_pyethereum: Transaction = self._build_contract_creation_tx_with_valid_signature(self.tx_dict, self.s)<EOL>self.tx_raw = rlp.encode(self.tx_pyethereum)<EOL>self.tx_hash = self.tx_pyethereum.hash<EOL>self.deployer_address = checksum_encode(self.tx_pyethereum.sender)<EOL>self.safe_address = checksum_encode(self.tx_pyethereum.creates)<EOL>self.v = self.tx_pyethereum.v<EOL>self.r = self.tx_pyethereum.r<EOL>assert checksum_encode(mk_contract_address(self.deployer_address, nonce=<NUM_LIT:0>)) == self.safe_address<EOL>
Prepare Safe creation
:param w3: Web3 instance
:param owners: Owners of the Safe
:param threshold: Minimum number of users required to operate the Safe
:param signature_s: Random s value for ecdsa signature
:param master_copy: Safe master copy address
:param gas_price: Gas Price
:param funder: Address to refund when the Safe is created. Address(0) if no need to refund
:param payment_token: Payment token instead of paying the funder with ether. If None Ether will be used
:param payment_token_eth_value: Value of payment token per 1 Ether
:param fixed_creation_cost: Fixed creation cost of Safe (Wei)