matter-labs/hardhat-zksync

Verifying smart contracts stopped working for some reason

Closed this issue · 2 comments

9 days ago all verifications (on zkSync Era Testnet) went through smoothly, but now it fails after this warning is emitted in the console:

 Warning: It looks like your code or one of its dependencies uses the 'extcodesize' instruction,  │
│ which is usually needed in the following cases:                                                  │
│   1. To detect whether an address belongs to a smart contract.                                   │
│   2. To detect whether the deploy code execution has finished.                                   │
│ zkSync era comes with native account abstraction support (so accounts are smart contracts,       │
│ including private-key controlled EOAs), and you should avoid differentiating between contracts   │
│ and non-contract addresses.                                                                      │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
--> @openzeppelin/contracts/utils/Address.sol

The Address.sol is a library from OpenZeppelin and many projects depend on it.

It is not clear whether this warning is the cause of the problem, or something else which silently fails and is not printed out in the console.

The smart contract gets deployed, it's just the verification part that fails.


@tempe-techie this issue should be solved with the newest release of the verify plugin.
Check it out here.

Thanks! In the meantime I flattened the contracts and verified them manually (on mainnet). But it's better to being able to do it via verify plugin.