Closed tahos81 closed 4 months ago
Unfortunately, zkSync handles contract deployments a bit differently to Ethereum, so using different bytecode / deployless verification probably won't work. :\
Can see what I can do.
Added a fallback for this scenario here: https://github.com/wevm/viem/commit/ec3b0e08f0a379249224e65092277191f1a8502b.
This issue has been locked since it has been closed for more than 14 days.
If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Viem version. If you have any questions or comments you can create a new discussion thread.
Check existing issues
Viem Version
2.16.5
Current Behavior
When doing anything that uses
verifyHash
internally (likeverifySiweMessage
) if the public client in context is a zksync client verification fails. Reason for that isverifyHash
uses erc-6492 for signature verification and has a constant calleduniversalSignatureValidatorByteCode
but regular bytecodes does not work on zksync so verification fails even when the signature is valid. This is not a problem for eoa's (you can just verify with an arbitrary public client) but it is breaking for smart contract accountsExpected Behavior
Either a different constant bytecode should be used when the chain in context is zksync or 6492 flow should not be used and verification flow should revert to old flow (1271 + ecrecover).
Steps To Reproduce
No response
Link to Minimal Reproducible Example
https://stackblitz.com/edit/viem-getting-started-shqa8r?file=index.ts
Anything else?
No response