As you may know, the default solc optimizer “runs” value is 200.

Apparently remix does not permit to change this value.

Has someone any idea of how to change it?


Someone might have a better idea, but you could serve Remix locally on your own machine by following the instructions for building here and here.

Once you've understood the build flow, you can then tweak the runs value in the compiler-input.js file:

module.exports = (sources, opts) => {
  return JSON.stringify({
    language: 'Solidity',
    sources: sources,
    settings: {
      optimizer: {
        enabled: opts.optimize === true || opts.optimize === 1,
        runs: 200
  • 2
    This is a brilliant idea. It is not applicable in this exact moment because the current version, 0.7.5, suffers from a bug in remixd interface that, for the moment, requires to use the online version. But it is brilliant! – Rick Park Dec 27 '18 at 16:11
  • Thanks for pointing out the bug in the current version :-) You could try git clone-ing a version from before the bug was introduced, but you'd need to work out which commit introduced the bug. This might, a) be more hassle than it's worth, and b) remove some other functionalities that you need for your testing. Hopefully the bug will be resolved in the near future :-) – Richard Horrocks Dec 27 '18 at 17:29
  • Indeed dev team promised to fix this soon... – Rick Park Dec 27 '18 at 17:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.