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

Verification problem #1527

Open
RomanYarinski opened this issue Nov 1, 2024 · 3 comments
Open

Verification problem #1527

RomanYarinski opened this issue Nov 1, 2024 · 3 comments

Comments

@RomanYarinski
Copy link

RomanYarinski commented Nov 1, 2024

🐛 Bug Report for hardaht-zksync plugins

💥 Plugin name

"@matterlabs/hardhat-zksync-verify": "^0.1.8",

📝 Description

I can't verify the contracts after deploy.
Although before (about a week ago) everything worked fine with the same configuration.

🔄 Reproduction Steps

Step 1 - yarn hardhat compile --force --network zkSyncSepolia
Step 2 - yarn hardhat deploy-zksync --script zk/zk_01_deploy_exchange.ts --network zkSyncSepolia
Step 3 - yarn hardhat verify --network zkSyncSepolia

🤔 Expected Behavior

verify contracts

😯 Current Behavior

error in Log Output

🖥️ Environment

  • Operating System & Version: [e.g., Ubuntu 24]
  • zkSolc: "latest" zksolc v1.5.6 and zkvm-solc v0.8.19-1.0.1
  • sol version: 0.8.19

📋 Additional Context

  • The same behavior when deploying a regular contract that does not upgradeable

📎 Log Output

Verifying implementation: 0x58A7ba76d0DEA4AB0011Ade6eC7B9a7a5376594c
ZkSyncVerifyPluginError: The address provided as argument contains a contract, but its bytecode doesn't match any of your local contracts.

      Possible causes are:
        - Contract code changed after the deployment was executed. This includes code for seemingly unrelated contracts.
        - A solidity file was added, moved, deleted or renamed after the deployment was executed. This includes files for seemingly unrelated contracts.
        - Solidity compiler settings were modified after the deployment was executed (like the optimizer, target EVM, etc.).
        - The given address is wrong.
        - The selected network is wrong.
Verifying proxy: 0xB02f6dCbAE7656Db837430Db2A80f370E97c6D6E
The address provided as argument contains a contract, but its bytecode doesn't match any of your local contracts.

      Possible causes are:
        - Contract code changed after the deployment was executed. This includes code for seemingly unrelated contracts.
        - A solidity file was added, moved, deleted or renamed after the deployment was executed. This includes files for seemingly unrelated contracts.
        - Solidity compiler settings were modified after the deployment was executed (like the optimizer, target EVM, etc.).
        - The given address is wrong.
        - The selected network is wrong.
Verifying proxy admin: 0x74677906cb1Cf948840eADFb48E5e3CadFCCB26F
The address provided as argument contains a contract, but its bytecode doesn't match any of your local contracts.

      Possible causes are:
        - Contract code changed after the deployment was executed. This includes code for seemingly unrelated contracts.
        - A solidity file was added, moved, deleted or renamed after the deployment was executed. This includes files for seemingly unrelated contracts.
        - Solidity compiler settings were modified after the deployment was executed (like the optimizer, target EVM, etc.).
        - The given address is wrong.
        - The selected network is wrong.
@RomanYarinski RomanYarinski changed the title verification problem Verification problem Nov 1, 2024
@kiriyaga-txfusion
Copy link
Contributor

kiriyaga-txfusion commented Nov 4, 2024

Hello @RomanYarinski,

It appears that the local bytecode has changed, possibly due to using a different zksolc version (since v1.5.7 is now latest). I recommend deleting all artifact and cache files, then recompiling, deploying, and verifying again. Note that zksolc version 1.5.7 is currently not supported for verification on Etherscan.

@RomanYarinski
Copy link
Author

RomanYarinski commented Nov 4, 2024

@kiriyaga-txfusion
I've tried it, it just happening right after I compile, deploy and verify the contract. Switching to “1.3.23” zkSync version helped for me.

@kiriyaga-txfusion
Copy link
Contributor

@RomanYarinski
You use an outdated verification plugin, and I believe we've changed how parameters are sent to the compiler. One solution is to update the dependencies to newer versions, or you can keep the existing dependencies, but this will prevent verification with the latest compiler versions.

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