/** * Export contract to specified xml or json file. * * @param contract - contract to export. * @param fileName - name of file to export to. * @param format - format of file to export to. Can be xml or json. */ private static void exportContract(Contract contract, String fileName, String format) throws IOException { exportContract(contract, fileName, format, false); }
name = new FilenameTool(source).setExtension(format).toString(); exportContract(contract, name, format, options.has("pretty"));
CLIMain.exportContract(cNew1, rootPath + "cNew1.json", "json", true); CLIMain.exportContract(cNew2, rootPath + "cNew2.json", "json", true); CLIMain.exportContract(cNew1_1, rootPath + "cNew1_1.json", "json", true); CLIMain.exportContract(cRevoke1, rootPath + "cRevoke1.json", "json", true); CLIMain.exportContract(cRevoke2, rootPath + "cRevoke2.json", "json", true);