matter-labs / foundry-zksync

Fork of Foundry tailored for zkSync environment
Apache License 2.0
302 stars 130 forks source link

fix: add verbosity for verification compilation error #703

Closed dutterbutter closed 2 weeks ago

dutterbutter commented 2 weeks ago

What :computer:

Why :hand:

Verification failed:

Error:
Compilation error

Error Details:
- Invalid EVM version requested.

View verification response:
https://explorer.sepolia.era.zksync.dev/contract_verification/31422

Evidence :camera:

Include screenshots, screen recordings, or console output here demonstrating that your changes work as intended

nbaztec commented 2 weeks ago

I agree with @Karrq this is entirely new functionality that helps both EVM and zkEVM. If it's super urgent we could consider having it, but that would conflict with upstream merges that we need to take into consideration.

dutterbutter commented 2 weeks ago

@nbaztec @Karrq Can you elaborate on how this would be applicable upstream / EVM?

The contract verifier for ZKsync block explorer is specific to our implementation? The responses from the verifier (e.g. {"status":"failed","error":"Compilation error","compilationErrors":["Invalid EVM version requested."]} ) will not be the same on other block explore instances and you can't verify EVM compiled contracts with it? The changes are isolated into zksync/.

What am I missing?

nbaztec commented 2 weeks ago

Oh I was under the impression that this is a generic verification error. If it's already our custom module feel free to make any changes.

Karrq commented 2 weeks ago

Oh I was under the impression that this is a generic verification error

I had the same, considering that this previously was common with etherscan, my bad