Add universal signature verification (ERC-1271 + ERC-6492)#266
Merged
Conversation
alisinabh
force-pushed
the
feat/eip-191-personal-message
branch
from
July 19, 2026 04:29
adbc89c to
4ed65a5
Compare
alisinabh
force-pushed
the
feat/universal-sig-verification
branch
from
July 19, 2026 04:29
ebe1cac to
6997141
Compare
Add Ethers.Signature with verify_hash/4, verify_message/4 and
verify_typed_data/4, verifying any signature kind against an address:
- Plain EOA ECDSA signatures verify locally via ecrecover with no RPC
round-trip (fast path).
- ERC-1271 smart-contract wallet signatures and ERC-6492-wrapped
signatures from counterfactual (not-yet-deployed) wallets verify with
a single deployless eth_call executing the ERC-6492
UniversalSigValidator reference contract (bytecode vendored from
viem / Ambire signature-validator, shipped as a constant in
Ethers.Contracts.UniversalSigValidator — nothing is deployed).
Invalid signatures return {:ok, false}; {:error, reason} is reserved for
malformed input and RPC transport failures, so there are deliberately no
bang variants.
Tested against anvil with a minimal ERC-1271 wallet fixture and a
CREATE2 factory fixture covering deployed-wallet and counterfactual
(ERC-6492) verification, plus EOA fast-path tests proving no RPC usage.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
alisinabh
force-pushed
the
feat/universal-sig-verification
branch
from
July 19, 2026 04:37
6997141 to
63c965c
Compare
alisinabh
commented
Jul 19, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Second PR of the v0.7 "Auth" tier. Stacked on #265 (base is
feat/eip-191-personal-message; retarget tomainafter #265 merges).What
Ethers.Signaturemodule:verify_hash/4,verify_message/4(EIP-191),verify_typed_data/4(EIP-712) — verifies any signature: EOA ecrecover, ERC-1271 smart-contract wallets, and ERC-6492-wrapped signatures from counterfactual (not-yet-deployed) wallets.{:ok, true}with zero RPC calls. Everything else goes through one deploylesseth_callof the ERC-6492UniversalSigValidator(creation code as call data, noto).lib/ethers/contracts/universal_sig_validator.exholds the validator creation bytecode (sourced from viem'serc6492SignatureValidatorByteCode, i.e. Ambire's ERC-6492 referenceValidateSigOffchain; provenance documented).{:ok, false}for invalid signatures (incl. validator reverts on malformed input);{:error, reason}only for transport failures. No bang variants — they would conflatefalsewith errors.Testing
Ethers.Signatureincl. all branches.mix format,mix credo --strict,mix dialyzerclean.🤖 Generated with Claude Code