-
Notifications
You must be signed in to change notification settings - Fork 396
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
feat: FIP-8 verifications for contract wallets #1449
Conversation
🦋 Changeset detectedLatest commit: 7ef4797 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
09e3072
to
d5e6057
Compare
d5e6057
to
d3a1e05
Compare
Codecov ReportAttention:
... and 1 file with indirect coverage changes 📢 Thoughts on this report? Let us know!. |
10c64e8
to
5f97820
Compare
32285d0
to
a4c672a
Compare
b6366de
to
d44ce97
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some type-related comments, but otherwise looks good to me
d264f4c
to
a54f653
Compare
5d89f0c
to
7ef4797
Compare
Motivation
Support verifications signed by smart contracts. See FIP-8 for more details.
Change Summary
Update validations to verify smart contract signatures provided in verification messages using
publicClient.verifyTypedData
. This function makes an RPC call to verify smart contract signatures, trying EIP-6492, EIP-1271, and ECDSA recovery in order.Create and pass default public clients to validation functions that may need them.
Merge Checklist
Choose all relevant options below by adding an
x
now or at any time before submitting for reviewAdditional Context
Related protocol docs PR: farcasterxyz/protocol#129
Hubble
publicClient
at hub creation time.l2PublicClient
. Pass public clients through to validation functions.Core
eth/clients
andeth/chains
modules, providing default mainnet/testnet public clients.PublicClients
will inherit the defaults.publicClient.verifyTypedData
. This function makes an RPC call to verify smart contract signatures, trying EIP-6492, EIP-1271, and ECDSA recovery in order. Note that we don't use this for EOA recovery to avoid making an unnecessary RPC call. Instead we call the "offline"verifyTypedData
util (i.e. the existing EOA signature verification behavior).VerificationAddEthAddressBody
protobuf to addchainId
andverificationType
.chainId
argument tosignVerificationEthAddressClaim
contractSignature
parameter to verification factory.PR-Codex overview
This PR focuses on adding FIP-8 contract verifications to the Farcaster codebase.
Detailed summary
eth
modulesignVerificationEthAddressClaim
method in various signers to include thechainId
parameterdefaultPublicClients
anddefaultL1PublicTestClient
to theclients
moduleVerificationAddEthAddressBodyFactory
in thefactories
module to include thecontractSignature
parameterHub
andValidationWorkerData
classes in thehubble
module to include support for optimism chainsMessage
andMessageData
protobufs in theschemas
module to includeverification_type
andchain_id
fields