Repository navigation
[Contract Verification] How to verify using foundry when using standard EVM, #1152
Team or ProjectNo response ZK chainEra EnvironmentMainnet Block ExplorerZKsync explorer (e.g. https://explorer.zksync.io) Issue Type
Contract AddressNa Compiler TypeMulti-part contract zkSolc VersionNa Solc VersionNa Contract NameNa Contract CodeNa Constructor ArgumentsNa Hardhat Verify Plugin VersionNo response Repo Link (Optional)No response Additional DetailsIn general I have been unable to verify contracts that aren't compiled with zksolc and instead just target the standard interpreted evm. In the api schema there doesn't seem to be a flag for this, https://block-explorer-api.mainnet.zksync.io/docs#/Contract%20API/ApiController_verifyContractSourceCode |
Replies: 4 comments
|
this looks close to matter-labs/zksync-era#4779 and the follow-up fix in matter-labs/zksync-era#4785. That thread is specifically about EVM-emulated / non-zksolc verification on Era mainnet with Foundry/solc payloads and the same verifier backend, so I’d start there before treating this as a missing schema flag. Small caveat: I only checked the public issue/PR plus the current Swagger shape here. If your failure status is different from |
|
Hey @max-wickham , thanks for reporting this. There was a bug fixed in this PR . You can verify EVM contracts with foundry for example.
|
|
Hk |
Hey @max-wickham , thanks for reporting this. There was a bug fixed in this PR . You can verify EVM contracts with foundry for example.
To verify a contract on ZKsync Era Sepolia Testnet:
forge verify-contract {contract_address} {contract_path} --chain-id 300 --verifier etherscan --verifier-url https://block-explorer-api.sepolia.zksync.dev/api --etherscan-api-key "abc" --constructor-args {constructor_args}.