diff --git a/scripts/bytecodecompare/prepare_report.js b/scripts/bytecodecompare/prepare_report.js index 99f3a4b4b..1d1b04060 100755 --- a/scripts/bytecodecompare/prepare_report.js +++ b/scripts/bytecodecompare/prepare_report.js @@ -30,15 +30,15 @@ for (const optimize of [false, true]) Object.keys(result['contracts']).every(file => Object.keys(result['contracts'][file]).length === 0) ) // NOTE: do not exit here because this may be run on source which cannot be compiled - console.log(filename + ': ERROR') + console.log(filename + ': ') else for (const contractFile in result['contracts']) for (const contractName in result['contracts'][contractFile]) { const contractResults = result['contracts'][contractFile][contractName] - let bytecode = 'NO BYTECODE' - let metadata = 'NO METADATA' + let bytecode = '' + let metadata = '' if ('evm' in contractResults && 'bytecode' in contractResults['evm'] && 'object' in contractResults['evm']['bytecode']) bytecode = contractResults.evm.bytecode.object diff --git a/scripts/bytecodecompare/prepare_report.py b/scripts/bytecodecompare/prepare_report.py index 19d5b374e..5d73cd4ea 100755 --- a/scripts/bytecodecompare/prepare_report.py +++ b/scripts/bytecodecompare/prepare_report.py @@ -35,12 +35,12 @@ for optimize in [False, True]: len(result['contracts']) == 0 or all(len(file_results) == 0 for file_name, file_results in result['contracts'].items()) ): - REPORT_FILE.write(f + ": ERROR\n") + REPORT_FILE.write(f + ": \n") else: for filename in sorted(result['contracts'].keys()): for contractName in sorted(result['contracts'][filename].keys()): - bytecode = result['contracts'][filename][contractName].get('evm', {}).get('bytecode', {}).get('object', 'NO BYTECODE') - metadata = result['contracts'][filename][contractName].get('metadata', 'NO METADATA') + bytecode = result['contracts'][filename][contractName].get('evm', {}).get('bytecode', {}).get('object', '') + metadata = result['contracts'][filename][contractName].get('metadata', '') REPORT_FILE.write(filename + ':' + contractName + ' ' + bytecode + '\n') REPORT_FILE.write(filename + ':' + contractName + ' ' + metadata + '\n')