Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ability to call deployed universal signature validator for chains that do not support createless call #2807

Merged
merged 6 commits into from
Oct 13, 2024

Conversation

coffeexcoin
Copy link
Contributor

@coffeexcoin coffeexcoin commented Oct 2, 2024

Creates a new property on chain.contracts for universalSignatureVerifier. Calling the verifyHash action will prefer this deployed address over a createless deploy call. This is useful for chains that do not support createless calls (zk stack)

Added deployed version of universal signature verifier to zksync, zksync sepolia, and abstract mainnet.


PR-Codex overview

This PR introduces a new universalSignatureVerifier feature across multiple files, implementing a signature verification mechanism and related deployment functions. It removes unused code and adds tests to ensure proper functionality.

Detailed summary

  • Added universalSignatureVerifier property in chain.ts and various chain definitions.
  • Implemented isValidSig function in VerifySig contract for signature validation.
  • Created deployUniversalSignatureVerifier function for deploying the verifier.
  • Updated tests in verifyHash.test.ts to include scenarios for the new verifier.
  • Removed isBytesEqual.ts and associated tests as they were no longer needed.
  • Modified verifyHash.ts to integrate the new verifier into the verification process.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

changeset-bot bot commented Oct 2, 2024

⚠️ No Changeset found

Latest commit: 39c6696

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Oct 2, 2024

@coffeexcoin is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

@coffeexcoin coffeexcoin changed the title add ability to call deployed universal signature validator for chains… add ability to call deployed universal signature validator for chains that do not support createless call Oct 2, 2024
@coffeexcoin coffeexcoin marked this pull request as ready for review October 2, 2024 14:45
@coffeexcoin
Copy link
Contributor Author

This is related to #2484 as zksync is one of the chains that does not support createless deployment. This will add full support for ERC-6942 and ERC-1271 validation to zksync

@coffeexcoin coffeexcoin requested a review from jxom October 10, 2024 15:18
@coffeexcoin
Copy link
Contributor Author

I don't think these HTTP test failures seem to be related to my changes - are you able to confirm that?

@@ -33,5 +33,9 @@ export const zksync = /*#__PURE__*/ defineChain({
multicall3: {
address: '0xF9cda624FBC7e059355ce98a31693d299FACd963',
},
universalSignatureVerifier: {
address: '0x872146211f996755C8729042093ffb8660F8b129',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get these contracts verified please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated deployments for the new contract with the new function signature
Contracts are verified:
zksync mainnet
zksync sepolia
abstract testnet

@jxom jxom merged commit 7f55306 into wevm:main Oct 13, 2024
21 of 35 checks passed
nikola-bozin-txfusion pushed a commit to kiriyaga-txfusion/viem that referenced this pull request Oct 30, 2024
…chains that do not support createless call (wevm#2807)

* add ability to call deployed universal signature validator for chains that do not support createless call

* fix import

* remove unused isBytesEqual util

* update function name to `isValidSig`

* chore: tweaks

* update addresse for new deployment

---------

Co-authored-by: jxom <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants