Verifying smart contracts stopped working for some reason
Closed this issue · 2 comments
tempe-techie commented
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.
- Node.js version: v19.2.0
- npm version: 8.19.3
- Smart contract code: https://github.com/punk-domains/punk-zksync-contracts/blob/main/contracts/factories/soulbound/SoulboundPunkTLDFactory.sol
- Contract address on testnet: https://goerli.explorer.zksync.io/address/0xc3496554F548656367009E3a6dCCB416539dc831#contract
FilipTxFusion commented
@tempe-techie this issue should be solved with the newest release of the verify plugin.
Check it out here.
tempe-techie commented
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.