org.web3j.utils.Version Java Examples

The following examples show how to use org.web3j.utils.Version. 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: Runner.java    From etherscan-explorer with GNU General Public License v3.0 6 votes vote down vote up
public static void main(String[] args) throws Exception {
    System.out.println(LOGO);

    if (args.length < 1) {
        Console.exitError(USAGE);
    } else {
        switch (args[0]) {
            case "wallet":
                WalletRunner.run(tail(args));
                break;
            case "solidity":
                SolidityFunctionWrapperGenerator.run(tail(args));
                break;
            case "truffle":
                TruffleJsonFunctionWrapperGenerator.run(tail(args));
                break;
            case "version":
                Console.exitSuccess("Version: " + Version.getVersion() + "\n"
                        + "Build timestamp: " + Version.getTimestamp());
                break;
            default:
                Console.exitError(USAGE);
        }
    }
}
 
Example #2
Source File: WasmFunctionWrapper.java    From client-sdk-java with Apache License 2.0 5 votes vote down vote up
private String getWeb3jVersion() {
	String version;
	try {
		// This only works if run as part of the web3j command line tools which contains
		// a version.properties file
		version = Version.getVersion();
	} catch (IOException | NullPointerException e) {
		version = Version.DEFAULT;
	}
	return "\n<p>Generated with platon-web3j version " + version + ".\n";
}
 
Example #3
Source File: SolidityFunctionWrapper.java    From client-sdk-java with Apache License 2.0 5 votes vote down vote up
private String getWeb3jVersion() {
    String version;

    try {
        // This only works if run as part of the web3j command line tools which contains
        // a version.properties file
        version = Version.getVersion();
    } catch (IOException | NullPointerException e) {
        version = Version.DEFAULT;
    }
    return "\n<p>Generated with web3j version " + version + ".\n";
}
 
Example #4
Source File: SolidityFunctionWrapper.java    From etherscan-explorer with GNU General Public License v3.0 5 votes vote down vote up
private String getWeb3jVersion() {
    String version;

    try {
        // This only works if run as part of the web3j command line tools which contains
        // a version.properties file
        version = Version.getVersion();
    } catch (IOException | NullPointerException e) {
        version = Version.DEFAULT;
    }
    return "\n<p>Generated with web3j version " + version + ".\n";
}
 
Example #5
Source File: SolidityFunctionWrapper.java    From web3j with Apache License 2.0 5 votes vote down vote up
private String getWeb3jVersion() {
    String version;

    try {
        // This only works if run as part of the web3j command line tools which contains
        // a version.properties file
        version = Version.getVersion();
    } catch (IOException | NullPointerException e) {
        version = Version.DEFAULT;
    }
    return "\n<p>Generated with web3j version " + version + ".\n";
}