Conversation
There was a problem hiding this comment.
Pull request overview
Adds ERC-6492 signature validation support to the testapp’s verifySignMsg helper so signatures from undeployed smart contract wallets can be verified via Universal Signature Validator simulation (eth_call) before falling back to the existing EIP-1271 on-chain isValidSignature path.
Changes:
- Detect ERC-6492 signatures using
isErc6492Signatureand validate them viapublicClient.callwitherc6492SignatureValidatorByteCode. - ABI-encode the validator call payload and return ERC-6492-specific success/failure UI messages.
- Add
authorizationList: undefinedto the EIP-1271readContractcall to silence a viem type warning.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
examples/testapp/src/components/RpcMethods/method/signMessageMethods.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b-d-m-p
left a comment
There was a problem hiding this comment.
Clean implementation! The ERC-6492 detection and validator flow looks good. Just a couple minor suggestions.
Summary
Adds ERC-6492 signature validation support to the testapp's
verifySignMsghelper.ERC-6492 signatures are produced by undeployed smart contract wallets (e.g. a fresh SCW that has not yet been deployed on-chain). The standard
isValidSignaturecontract call would fail for these accounts because no contract exists yet.What changed (
examples/testapp/src/components/RpcMethods/method/signMessageMethods.ts):encodeAbiParameters,erc6492SignatureValidatorByteCode,isErc6492Signature,parseAbiParameters.verifySignMsg, detect ERC-6492 signatures withisErc6492Signaturebefore falling back to the existing EIP-1271 path.(address signer, bytes32 hash, bytes wrappedSignature)and simulate the Universal Signature Validator bytecode viapublicClient.call. The validator deploys the account and callsisValidSignaturein a single read-onlyeth_call— nothing is deployed on-chain.boolresult from the returned ABI-encoded data and return a human-readable verification message.authorizationList: undefinedto the fallbackreadContractcall to silence a viem type warning.How did you test your changes?
verifySignMsg. The ERC-6492 path returns"SigUtil Successfully verified signer as <address> (ERC-6492)".readContractpath without regression.