大家好,我到处搜索,但没有合理的解释,为什么我会得到这些例外,我已经要求,并与我的地址相关的三个以太。下面是我发送以太的代码:
private static void transferEther(String password)
throws IOException, CipherException, InterruptedException, TransactionException {
Web3j web3 = Web3j.build(new HttpService("https://rinkeby.infura.io/v1/<API-KEY>"));
Web3ClientVersion web3ClientVersion = web3.web3ClientVersion().send();
String clientVersion = web3ClientVersion.getWeb3ClientVersion();
System.out.println("Connected to Ethereum client version: " + clientVersion);
Credentials credentials = WalletUtils.loadCredentials(password,
new File("/PATH_TO_FILE/"
+ "UTC--2018-12-12T07-39-27.54000000Z--ff1062eb9f9f4369780f8029fe60a5825eb943c9.json")
.toString());
RemoteCall<TransactionReceipt> transactionReceipt = Transfer.sendFunds(web3, credentials,
"ADDRESS", BigDecimal.valueOf(0.2), Convert.Unit.ETHER);
System.out.println("Funds transfer completed, transaction hash: " + transactionReceipt.toString());
}但我有以下例外:
线程"main“中的异常:rx/调度程序/调度程序在org.web3j.protocol.rx.JsonRpc2_0Rx.(JsonRpc2_0Rx.java:39) at org.web3j.protocol.core.JsonRpc2_0Web3j.(JsonRpc2_0Web3j.java:87) at org.web3j.protocol.core.JsonRpc2_0Web3j.(JsonRpc2_0Web3j.java:80) at org.web3j.protocol.Web3j.build(Web3j.java:21)在CreateWallet.transferEther(CreateWallet.java:51) at CreateWallet.main(( java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) .
发布于 2018-12-14 07:42:38
万一有人有这个问题,我找到了解决办法。这只是一个代理问题和缺少的库问题。
https://ethereum.stackexchange.com/questions/64008
复制相似问题