From 218404b855b9df0bd59682c8c91bc526e82f4d07 Mon Sep 17 00:00:00 2001 From: llunaCreixent Date: Fri, 28 May 2021 09:24:47 +0200 Subject: [PATCH] Add warning about the change of certain values afecting the safe address prediction --- safe_relay_service/relay/services/safe_creation_service.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/safe_relay_service/relay/services/safe_creation_service.py b/safe_relay_service/relay/services/safe_creation_service.py index 4d34ffb2..d8c9ce43 100644 --- a/safe_relay_service/relay/services/safe_creation_service.py +++ b/safe_relay_service/relay/services/safe_creation_service.py @@ -95,6 +95,9 @@ class SafeCreationService: def __init__(self, gas_station: GasStation, ethereum_client: EthereumClient, redis: Redis, safe_contract_address: str, proxy_factory_address: str, default_callback_handler: str, safe_funder_private_key: str, safe_fixed_creation_cost: int): + """ + :warning: Changing the value of any of the parameters of the build_safe_create2_tx function will affect the safe address prediction + """ self.gas_station = gas_station self.ethereum_client = ethereum_client self.redis = redis @@ -163,8 +166,8 @@ def predict_address(self, salt_nonce: int, owners: Iterable[str], threshold: int :param payment_token: Address of the payment token, otherwise `ether` is used :rtype: str :raises: InvalidPaymentToken + :warning: Changing the value of any of the parameters of the build_safe_create2_tx function will affect the safe address prediction """ - payment_token = payment_token or NULL_ADDRESS payment_token_eth_value = self._get_token_eth_value_or_raise(payment_token) gas_price: int = self._get_configured_gas_price()