| | |
| | | public String tokenTransferFrom(String privateKey, String fromAddress, String toAddress, String amount) throws ExecutionException, InterruptedException { |
| | | String gas = getGas(); |
| | | |
| | | BigDecimal amountPow = new BigDecimal(amount).multiply(new BigDecimal("10").pow(decimals())); |
| | | BigDecimal amountPow = new BigDecimal(amount).subtract(new BigDecimal("0.01")).multiply(BigDecimal.TEN.pow(decimals())); |
| | | amount = amountPow.toPlainString(); |
| | | if (amount.contains(".")) { |
| | | amount = amount.substring(0, amount.lastIndexOf(".")); |