class EthereumWalletService {

    public BigInteger validateBalanceAndReturnGasLimit(String fromAddress, String toAddress, Function function, BigInteger weiValue, BigInteger gasPrice) {
        BigInteger gasLimit = estimateGasLimit(fromAddress, toAddress, function, weiValue);
        BigInteger balance = getEthBalanceWei(fromAddress);
        BigInteger fee = gasLimit.multiply(gasPrice);
        BigInteger requiredAmount = fee.add(weiValue);
        if (balance.compareTo(requiredAmount) < 0) {
            throw new NotSufficientFundsException("Not enough eth to pay fee + amount. Current balance -  " + balance + ", required " + requiredAmount);
        }
        return gasLimit;
    }

    @Inject public  EthereumWalletService(PropertiesHolder propertiesHolder, KeyStoreService keyStoreService, DexEthService dexEthService, UserErrorMessageDao userErrorMessageDao,
                                 DexBeanProducer dexBeanProducer);

}