-1

我正在尝试将 BUSD 从一个元掩码钱包发送到另一个。我使用 bsc testnet https://data-seed-prebsc-1-s1.binance.org:8545 并执行以下代码。

    try {
        BigInteger gasPrice = client.ethGasPrice().send().getGasPrice();


        BigInteger nonce = client.ethGetTransactionCount(credentials.getAddress(),
                DefaultBlockParameterName.LATEST).send().getTransactionCount();

        RawTransaction rawTransaction = RawTransaction
                .createTransaction(
                        nonce,
                        gasPrice,
                        GAS_LIMIT,
                        "0x4f090FF8782D4Ec6C64A9fA0a0Ec234a7eECdAC5", new BigInteger("4"), "");

        byte[] signedMessage = TransactionEncoder.signMessage(rawTransaction, credentials);
        String hexValue = Numeric.toHexString(signedMessage);

        EthSendTransaction response = client.ethSendRawTransaction(hexValue).sendAsync().get();
        if (response.getError() != null) {
            throw new RuntimeException("ETH transaction failed: " + response.getError().getCode() + ": " +
                    response.getError().getMessage());
        }

        log.info("transaction hash: {}", response.getTransactionHash());
        response.getTransactionHash();
    } catch (InterruptedException | ExecutionException | IOException e) {
        throw new RuntimeException("Unable to send", e);
    }

但是在 bsc 扫描中,我看到交易的价值是 - 4 wei。我如何在 BUSD 中看到它?

4

0 回答 0