You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering an issue when attempting to verify a Solidity library on the zkSync network using the @matterlabs/hardhat-zksync plugin. While I was able to deploy a Solidity library (MathLib) successfully, the verification process fails with an error indicating a bytecode mismatch. This issue seems specific to the verification of Solidity libraries, as I was able to verify a regular contract (Greeter) without any problems.
Deploy the MathLib library to the zkSync network: yarn hardhat deploy-zksync:libraries --private-key <private-key>
Attempt to verify the MathLib library: yarn hardhat verify <MathLib address> --contract contracts/MathLib.sol:MathLib. My library was deployed to 0xE6f95768D5BADC7561EC7Fb6BCE2459F0fF69CDc
Observe the following error:
Error in plugin @matterlabs/hardhat-zksync-verify: 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.
The text was updated successfully, but these errors were encountered:
The Greeter contract was verified automatically as part of the deployment process, it would be great if libraries were also verified automatically as part of yarn hardhat deploy-zksync:libraries
Thanks for the information. We are aware of this issue and we are working together with the backend verification team to resolve it.
As for the automatically verifying libraries as part of yarn hardhat deploy-zksync:libraries, that would mean that our deploy plugin needs to depend on verify plugin, and we don't want that because this would introduce unnecessary dependencies between those plugins.
Description
I am encountering an issue when attempting to verify a Solidity library on the zkSync network using the
@matterlabs/hardhat-zksync
plugin. While I was able to deploy a Solidity library (MathLib
) successfully, the verification process fails with an error indicating a bytecode mismatch. This issue seems specific to the verification of Solidity libraries, as I was able to verify a regular contract (Greeter
) without any problems.Steps to Reproduce
MathLib.sol
) and a dependent contract (Calculator.sol
).MathLib:
Calculator:
MathLib
library to the zkSync network:yarn hardhat deploy-zksync:libraries --private-key <private-key>
MathLib
library:yarn hardhat verify <MathLib address> --contract contracts/MathLib.sol:MathLib
. My library was deployed to0xE6f95768D5BADC7561EC7Fb6BCE2459F0fF69CDc
The text was updated successfully, but these errors were encountered: