mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
prepare_report: Make error/missing data placeholders actually look like placeholders
This commit is contained in:
parent
fe7cc2097b
commit
887497a406
@ -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 + ': <ERROR>')
|
||||
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 = '<NO BYTECODE>'
|
||||
let metadata = '<NO METADATA>'
|
||||
|
||||
if ('evm' in contractResults && 'bytecode' in contractResults['evm'] && 'object' in contractResults['evm']['bytecode'])
|
||||
bytecode = contractResults.evm.bytecode.object
|
||||
|
@ -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 + ": <ERROR>\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', '<NO BYTECODE>')
|
||||
metadata = result['contracts'][filename][contractName].get('metadata', '<NO METADATA>')
|
||||
|
||||
REPORT_FILE.write(filename + ':' + contractName + ' ' + bytecode + '\n')
|
||||
REPORT_FILE.write(filename + ':' + contractName + ' ' + metadata + '\n')
|
||||
|
Loading…
Reference in New Issue
Block a user