web3j 的 Infura Http 客户端
web3j Infura 模块提供了一个Infura Http 客户端(InfuraHttpService),它为Infura特定的Infura-Ethereum-Preferred-Client提供支持。这允许你指定是否希望geth或Parity客户端响应你的请求。你可以像普通的HTTPClient一样创建客户端: Web3j web3 = Web3j.build(new HttpService("https://rinkeby.infura.io/<your-token>")); Web3ClientVersion web3ClientVersion = web3.web3ClientVersion().send(); System.out.println(web3ClientVersion.getWeb3ClientVersion()); Geth/v1.7.2-stable-1db4ecdc/darwin-amd64/go1.9.1 如果你想测试一些JSON-RPC对Infura的调用,请更新你的集成测试CoreIT用Infura URL并运行它。 有关进一步的信息...