Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tenderly can't compile contracts because it doesn't support --via-ir option #128

Open
jrico207 opened this issue Apr 2, 2023 · 1 comment

Comments

@jrico207
Copy link

jrico207 commented Apr 2, 2023

My contract needs solidity compiler option --via-ir it seems tenderly.verifyMultiCompilerAPI does not use this compiler option. Hardhat supports this option so while I'm able to use it with hardhat, I can't compile and verify contracts using tenderly.

Can you add viaIR option?

This is how it looks on hardhat.

                compiler: {
                    version: "0.8.17",
                    settings: {
                        optimizer: {
                            enabled: true,
                            runs: 1000,
                        },
                        viaIR: true
                    },
                }

Without it, I get this compilation error.

    error_type: 'CompilerError',
    component: 'general',
    message: 'Compiler error (/solidity/libsolidity/codegen/LValue.cpp:52):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.',
    formatted_message: undefined
  }
@dule-git
Copy link
Contributor

Hey @jrico207,

Maybe the issue is resolved for you now after many versions have been released.
But I would advise for moving from verifyMultiCompilerAPI since it does the same thing as tenderly.verify, but it is way less stable.

tenderly.verify loads the compiler configuration that you used to to deploy the contract from hardhat, which is more reliable than you providing the compiler config by yourself.

Or maybe you have a use-case that we are not covering?
Maybe you have deployed this contract months ago and you want to verify that contract with the compiler config you used back then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants