[Contract Verification] ZkSyncVerifyPluginError contract bytecode doesn't match any of your local contracts #588
-
EnvironmentMainnet Block ExplorerIssue Type
Contract Address0x8df11D942E9C8451f8bcB422a72973b08fc2181e Compiler TypeSingle file zkSolc Versionv1.5.0 Solc Versionv0.8.21 Contract NameFlatPriceSaleFactory_v_2_1 Contract Code
Constructor Arguments["0x066D791cE75d0275309BB672e296B3c6f8D9Eaa0"] Hardhat Verify Plugin Version1.4.3 Repo Link (Optional)https://github.com/ArshaanB/contract-factory-quickstart Additional DetailsDeploying a simple
These contracts deploy just fine on non-zkSync chains without issues and also get verified. I have attached the repository with the commands I've used in the README. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @ArshaanB, It seems that To fix this issue until we release a new version of import "@matterlabs/hardhat-zksync"; inside import "@matterlabs/hardhat-zksync-solc";
import "@matterlabs/hardhat-zksync-deploy";
import "@matterlabs/hardhat-zksync-verify";
import "@matterlabs/hardhat-zksync-node"; Since the upgradable package is not used. And to replace import from import { Deployer } from "@matterlabs/hardhat-zksync"; with: import { Deployer } from "@matterlabs/hardhat-zksync-deploy"; Since it will import index.ts of It should work. Here is my deployed and verified contract: Verified Contract on Sepolia. NOTE: Use zksolc compiler version 1.4.1 since 1.5.0 is not supported on verification BE. |
Beta Was this translation helpful? Give feedback.
Hey @ArshaanB,
It seems that
hardhat-zksync-upgradable
is used for verification because it finds the storage slot of the deployed proxy and since that plugin is imported insidehardhat-zksync
plugin. However, since the contract wasn't deployed withhardhat-zksync-upgradable
, strange behavior occurred.To fix this issue until we release a new version of
hardhat-zksync-upgradable
that resolves it, you can replace:inside
hardhat.config.ts
with:Since the upgradable package is not used.
A…