@Override
public void run() throws Exception {
super.run();
EthGetCompilers compilers = web3j
.ethGetCompilers()
.sendAsync()
.get();
System.out.println("Available compilers:");
for(String compiler: compilers.getResult()) {
System.out.println("- " + compiler);
}
System.out.println();
String sourceFile = String.format("%s/%s.%s", FOLDER_SOURCE, CONTRACT, Web3jConstants.EXT_SOLIDITY);
String sourceCode = Web3jUtils.readSolidityFile(sourceFile);
compileSolidity(sourceCode, CONTRACT, FOLDER_SOURCE);
String binaryFile = getBinaryFileName(CONTRACT, FOLDER_SOURCE);
String abiFile = getAbiFileName(CONTRACT, FOLDER_SOURCE);
String [] cmdLine = {binaryFile, abiFile, "-p", BASE_PACKAGE, "-o", FOLDER_TARGET};
System.out.printf("Running SolidityFunctionWrapperGenerator " + String.join(" ", cmdLine) + " ... ");
SolidityFunctionWrapperGenerator.main(cmdLine);
}