gnosis/safe/safe_service.py
def check_funds_for_tx_gas(self, safe_address: str, safe_tx_gas: int, data_gas: int, gas_price: int,
                               gas_token: str) -> bool:
        """
        Check safe has enough funds to pay for a tx
        :param safe_address: Address of the safe
        :param safe_tx_gas: Start gas
        :param data_gas: Data gas
        :param gas_price: Gas Price
        :param gas_token: Gas Token, to use token instead of ether for the gas
        :return: True if enough funds, False, otherwise
        """
        if gas_token == NULL_ADDRESS:
            balance = self.ethereum_client.get_balance(safe_address)
        else:
            balance = self.ethereum_client.erc20.get_balance(safe_address, gas_token)
        return balance >= (safe_tx_gas + data_gas) * gas_price
def check_funds_for_tx_gas(self, safe_address: str, safe_tx_gas: int, data_gas: int, gas_price: int,
                               gas_token: str) -> bool:
        """
        Check safe has enough funds to pay for a tx
        :param safe_address: Address of the safe
        :param safe_tx_gas: Start gas
        :param data_gas: Data gas
        :param gas_price: Gas Price
        :param gas_token: Gas Token, to use token instead of ether for the gas
        :return: True if enough funds, False, otherwise
        """
        if gas_token == NULL_ADDRESS:
            balance = self.ethereum_client.get_balance(safe_address)
        else:
            balance = self.ethereum_client.erc20.get_balance(safe_address, gas_token)
        return balance >= (safe_tx_gas + data_gas) * gas_price
Check safe has enough funds to pay for a tx
        :param safe_address: Address of the safe
        :param safe_tx_gas: Start gas
        :param data_gas: Data gas
        :param gas_price: Gas Price
        :param gas_token: Gas Token, to use token instead of ether for the gas
        :return: True if enough funds, False, otherwise