From 9d35b79aea125eaf022aa619848fed3e7c0ad6bb Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Fri, 25 Mar 2022 16:54:46 +0800 Subject: [PATCH] add tranfer record --- src/main/java/cc/mrbird/febs/dapp/chain/EthService.java | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/cc/mrbird/febs/dapp/chain/EthService.java b/src/main/java/cc/mrbird/febs/dapp/chain/EthService.java index 66c0309..dc5d148 100644 --- a/src/main/java/cc/mrbird/febs/dapp/chain/EthService.java +++ b/src/main/java/cc/mrbird/febs/dapp/chain/EthService.java @@ -2,6 +2,7 @@ import cc.mrbird.febs.common.exception.FebsException; import cn.hutool.core.collection.CollUtil; +import com.alibaba.fastjson.JSONObject; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.web3j.abi.FunctionEncoder; @@ -235,14 +236,12 @@ byte[] signedMessage = TransactionEncoder.signMessage(rawTransaction, credentials); String hexValue = Numeric.toHexString(signedMessage); - // log.debug("transfer hexValue:" + hexValue); - CompletableFuture<EthSendTransaction> ethSendTransactionCompletableFuture = web3j.ethSendRawTransaction(hexValue).sendAsync(); EthSendTransaction ethSendTransaction = ethSendTransactionCompletableFuture.get(); //return "hash"; +// log.info("====:{}", JSONObject.toJSONString(ethSendTransaction)); if (ethSendTransaction.hasError()) { - // log.info("transfer error:", ethSendTransaction.getError().getMessage()); return ""; } else { String transactionHash = ethSendTransaction.getTransactionHash(); -- Gitblit v1.9.1