feat: erc 6492 signature validation #744
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Documentation Outline:
Title: Add ERC-6942 Signature Validation for Pre-Deployed Contracts
Summary: This PR implements signature validation using ERC-6942, which enables verifying signatures for smart contract wallets even when they aren't deployed. This is necessary because some wallets delay contract deployment until the first transaction. By adopting ERC-6942, we validate signatures before wallet deployment.
Details:
Technical Changes:
Changes Made:
isValidateSignature()
method to support both deployed and pre-deployed contract signatures.Why This Change? Some smart contract wallets only deploy upon the first transaction. With ERC-6942, we can validate signatures before deployment, ensuring users experience seamless wallet interactions.
This diagram shows the two flows:
Deployed Contract: Traditional signature verification for deployed wallets.
Pre-Deployed Contract (ERC-6942): Signature verification for wallets that haven't been deployed yet.
universal validator ref: https://github.com/AmbireTech/signature-validator/blob/main/index.ts#L32