class AccountsManager {

    public Boolean hasFunds(Accounts accounts, String addressString, BigInteger value) throws IOException, ClassNotFoundException {
        logger.traceEntry("params: {} {} {}", accounts, addressString, value);
        Util.check(accounts != null, "accounts!=null");
        Util.check(!(addressString == null || addressString.isEmpty()), "addressString!=null");

        AccountAddress sendAddress = AccountAddress.fromHexString(addressString);
        AccountState senderAccountState = AppServiceProvider.getAccountStateService().getOrCreateAccountState(sendAddress, accounts);

        return logger.traceExit(senderAccountState.getBalance().compareTo(value) >= 0);
    }

}