Java Code Examples for org.web3j.protocol.core.methods.response.Web3ClientVersion#getWeb3ClientVersion()

The following examples show how to use org.web3j.protocol.core.methods.response.Web3ClientVersion#getWeb3ClientVersion() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CoreIT.java    From etherscan-explorer with GNU General Public License v3.0 5 votes vote down vote up
@Test
public void testWeb3ClientVersion() throws Exception {
    Web3ClientVersion web3ClientVersion = web3j.web3ClientVersion().send();
    String clientVersion = web3ClientVersion.getWeb3ClientVersion();
    System.out.println("Ethereum client version: " + clientVersion);
    assertFalse(clientVersion.isEmpty());
}
 
Example 2
Source File: EthereumNetworkManager.java    From guarda-android-wallets with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected String doInBackground(Void... params) {
    Web3ClientVersion web3ClientVersion = null;
    try {
        web3ClientVersion = web3jConnection.web3ClientVersion().send();
        String clientVersion = web3ClientVersion.getWeb3ClientVersion();
    } catch (IOException e) {
        e.printStackTrace();
    }
    return null;
}
 
Example 3
Source File: EthereumNetworkManager.java    From guarda-android-wallets with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected String doInBackground(Void... params) {
    Web3ClientVersion web3ClientVersion = null;
    try {
        web3ClientVersion = web3jConnection.web3ClientVersion().send();
        String clientVersion = web3ClientVersion.getWeb3ClientVersion();
    } catch (IOException e) {
        e.printStackTrace();
    }
    return null;
}
 
Example 4
Source File: EthereumNetworkManager.java    From guarda-android-wallets with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected String doInBackground(Void... params) {
    Web3ClientVersion web3ClientVersion = null;
    try {
        web3ClientVersion = web3jConnection.web3ClientVersion().send();
        String clientVersion = web3ClientVersion.getWeb3ClientVersion();
    } catch (IOException e) {
        e.printStackTrace();
    }
    return null;
}
 
Example 5
Source File: Web3jUtils.java    From web3j_demo with Apache License 2.0 5 votes vote down vote up
public static String getClientVersion(Web3j web3j) throws InterruptedException, ExecutionException {
	Web3ClientVersion client = web3j
			.web3ClientVersion()
			.sendAsync()
			.get();

	return client.getWeb3ClientVersion();
}
 
Example 6
Source File: CoreIT.java    From web3j with Apache License 2.0 5 votes vote down vote up
@Test
public void testWeb3ClientVersion() throws Exception {
    Web3ClientVersion web3ClientVersion = web3j.web3ClientVersion().send();
    String clientVersion = web3ClientVersion.getWeb3ClientVersion();
    System.out.println("Ethereum client version: " + clientVersion);
    assertFalse(clientVersion.isEmpty());
}