removed 'detail' key of optimizer for versions before yul

pull/7/head
LianaHus 5 years ago
parent 57ebf16ec5
commit 93f402ef48
  1. 8
      remix-solidity/src/compiler/compiler-input.js

@ -7,8 +7,7 @@ module.exports = (sources, opts) => {
settings: {
optimizer: {
enabled: opts.optimize === true || opts.optimize === 1,
runs: 200,
details: {}
runs: 200
},
libraries: opts.libraries,
outputSelection: {
@ -25,8 +24,9 @@ module.exports = (sources, opts) => {
if (opts.language) {
o.language = opts.language
}
if (opts.language === 'Yul' && o.settings.optimizer.enabled)
{
if (opts.language === 'Yul' && o.settings.optimizer.enabled) {
// details key is valid only for Yul
if (!o.settings.optimizer.details) o.settings.optimizer.details = {}
o.settings.optimizer.details['yul'] = true
}
return JSON.stringify(o)

Loading…
Cancel
Save