Merge pull request #1245 from ethereum/detailKeyword

removed 'detail' key of optimizer for versions before yul
pull/7/head
yann300 6 years ago committed by GitHub
commit 18ea01380f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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