mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
prepare_report: Report missing metadata as well
This commit is contained in:
parent
9f58f77b50
commit
fe7cc2097b
@ -38,11 +38,16 @@ for (const optimize of [false, true])
|
||||
const contractResults = result['contracts'][contractFile][contractName]
|
||||
|
||||
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
|
||||
|
||||
if ('metadata' in contractResults)
|
||||
metadata = contractResults.metadata
|
||||
|
||||
console.log(filename + ':' + contractName + ' ' + bytecode)
|
||||
console.log(filename + ':' + contractName + ' ' + contractResults['metadata'])
|
||||
console.log(filename + ':' + contractName + ' ' + metadata)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ for optimize in [False, True]:
|
||||
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]['metadata']
|
||||
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