matter-labs / matter-labs/block-explorer

"EVM Version" missing after verifying EVM contract with hardhat

Open
#409 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
139
Forks
145
Avg merge
8h 3m
Merged PRs (30d)
3

Description

#### 📝 Description

When using the etherscan plugin with Hardhat to verify an EVM contract, verification works, but the "EVM Version" is missing from the explorer

#### 🔄 Reproduction Steps

1. Create a hardhat project with `npx hardhat init`.
2. Deploy the contract to Era Sepolia testnet.
3. Add etherscan object to hardhat config with EVM verification endpoints:
```ts
etherscan: {
apiKey: {
// no API key is required
ZKsyncEraSepolia: "",
ZKsyncEraMainnet: "",
},
customChains: [
{
network: "ZKsyncEraSepolia",
chainId: 300,
urls: {
apiURL: "https://block-explorer-api.sepolia.zksync.dev/api",
browserURL: "https://sepolia.explorer.zksync.io"
}
},
{
network: "ZKsyncEraMainnet",
chainId: 324,
urls: {
apiURL: "https://block-explorer-api.mainnet.zksync.io/api",
browserURL: "https://explorer.zksync.io"
}
}
]
},
```
4. Run `npx hardhat verify --network mainnet DEPLOYED_CONTRACT_ADDRESS "Constructor argument 1"`.
5. See on the explorer that the contract was verified, but the "EVM Version" is missing:
![Image](https://github.com/user-attachments/assets/1468fd00-1856-4058-9aa9-e51aadd20fed)

#### 🤔 Expected Behavior

The explorer should display the EVM version automatically.

#### 😯 Current Behavior

It's missing.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the missing EVM version using the Hardhat verification steps and the ZKsync Era Sepolia or Mainnet explorer endpoints shown in the issue. Trace the verification request through the explorer and compare the returned contract metadata with what the contract page displays; done means a verified contract shows its EVM version.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.