diff --git a/scripts/bytecodecompare/prepare_report.py b/scripts/bytecodecompare/prepare_report.py index 74178c758..cd5ee7491 100755 --- a/scripts/bytecodecompare/prepare_report.py +++ b/scripts/bytecodecompare/prepare_report.py @@ -8,10 +8,13 @@ import json SOLC_BIN = sys.argv[1] REPORT_FILE = open("report.txt", mode="w", encoding='utf8', newline='\n') +def removeSMT(source): + return source.replace('pragma experimental SMTChecker;', '') + for optimize in [False, True]: for f in sorted(glob.glob("*.sol")): sources = {} - sources[f] = {'content': open(f, mode='r', encoding='utf8').read()} + sources[f] = {'content': removeSMT(open(f, mode='r', encoding='utf8').read())} input_json = { 'language': 'Solidity', 'sources': sources, diff --git a/scripts/bytecodecompare/storebytecode.sh b/scripts/bytecodecompare/storebytecode.sh index 185465bc9..02530db03 100755 --- a/scripts/bytecodecompare/storebytecode.sh +++ b/scripts/bytecodecompare/storebytecode.sh @@ -64,6 +64,11 @@ var fs = require('fs') var compiler = require('./solc-js/wrapper.js')(require('./solc-js/soljson.js')) +function removeSMT(source) +{ + return source.replace('pragma experimental SMTChecker;', ''); +} + for (var optimize of [false, true]) { for (var filename of process.argv.slice(2)) @@ -71,7 +76,7 @@ for (var optimize of [false, true]) if (filename !== undefined) { var inputs = {} - inputs[filename] = { content: fs.readFileSync(filename).toString() } + inputs[filename] = { content: removeSMT(fs.readFileSync(filename).toString()) } var input = { language: 'Solidity', sources: inputs,