2

I'm getting CompilerError: Stack too deep. Try compiling with `--via-ir` (cli) or the equivalent `viaIR: true` (standard JSON) while enabling the optimizer. Otherwise, try removing local variables. this error. According to solidity docs I need to add "viaIR": true option but I can't add the same option to the brownie-config.yaml file. Here is the file: compiler: viaIR: true solc: version: 0.8.17 optimizer: enabled: true runs: 200

3

1 Answer 1

0

Add viaIR to your brownie configuration (only on master branch of brownie at the time of writing)

$> cat brownie-config.yaml
[...]
compiler:
  solc:
    # viaIR option has been added in 0.8.13, you can adjust the version your need
    version: 0.8.13
    viaIR: True

See for more information https://github.com/eth-brownie/brownie/issues/1477

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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