-
Notifications
You must be signed in to change notification settings - Fork 48
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
Coinbase Smart Wallet EAS typed signature validation #109
Comments
Looks like the eas-sdk assumes that signer is always of EOA type, and ethers signature verification don't work here for smart account wallets. Need to use a better signature verification https://www.smartwallet.dev/guides/signature-verification#offchain |
Hi @Yuripetusko, |
Perfect, I was almost ready to start rewriting eas-sdk to viem :D But if you can solve this, that would be much easier |
Just adding some more info. The error is thrown here: Which then triggers this validation on ether's Signature: Some more context here: https://warpcast.com/pentacle.eth/0x05114005 |
Hey @Yuripetusko, could you try this version? https://github.com/ethereum-attestation-service/eas-sdk/tree/erc-6492 |
Hey, @lbeder you need to buld it I think, as dist folder doesn't contain this new function from viem that you added |
Oh, you're right. Built and updated. |
Unfortunatly the same error :(
|
This is strange. It means that |
Perhaps viem's |
viem's |
Don't hesitate to use me for debugging 😅 |
You shouldn't be parsing the response of |
Yeah, it might be inevitable. We are working on it and will keep everyone posted 🙏 |
Could you guys expand more on your case? Why do you require ERC-6492 signatures (i.e., passing 'smartWalletOnly')? Fully support ERC-6492 will also require contract changes, coordinating upgrades where possible (e.g., Optimism, Base), which takes lots of time and effort, and will also require a full backward compatibility layer to support older, non-upgradeable, instances of EAS. Replacing the verification with |
My specific case came from helping with some code on https://www.welcomeonchain.xyz/ which aims to be a go to directory for web3 projects with a focus on Base ecosystem. They use EAS with a specific schema to allow people to review and rate projects (as an early demo of the upcoming EAS-centric tooling/infra called blossom.land). Since the welcome onchain web app is focused on Base ecosystem, many users will be using Coinbase Smart Wallet, and they are looking for a way to allow them to create EAS with it. So in this particular case it's using EAS on Base/Base-sepolia with a specific schema on a specific project to review and rate projects, which is a pre-requesete for a standalone eas-based library/infra. So even if I would rewrite the sdk to viem, the eas wouldn't work? Is there perhaps some non-generalised solution that I can implement for my specific case before a more generalised solution can be considered? |
Yeah, the problem isn't Maybe this is actually unnecessary for this use case (ERC-6492 solves a very specific problem and this project might be using it as default by accident) and everything will work with 'eoaOnly' too). |
The wallet sdk config is set to Is this about differentiating users just just created smart wallet account (that is not deployed yet) VS smart wallet users who's account is already deployed? I can try it with a smart wallet that is already deployed and see if this changes anything, but somehow I doubt it.. |
So as I understand the problem is somewhere here right? |
It's not exactly a problem. It just makes supporting ERC-6492 a big effort, which will also require coordinating upgrades (where applicable) and a new backwards compatibility layer (where upgrades aren't), so it might wait for v2. ERC-6492 is also not really adopted and might change a few times before becoming an industry standard, so adding it now is also a little bit premature. |
But why do they need 'all' in the first place? How are they using ERC-6492 and why is it required for this use case? Only because they want to support a "Smart Wallet"? |
The website is aimed towards new web3 user onboarding (there is an educational section there), hence the name "Welcome onchain". The Base team wants to position Coinbase Smart wallet as the best method to onboard non web3 native users. And although project reviews using EAS are not strictly part of the educational section of the app, it is part of the website and a way to rate projects for new and seasonal users. I don't have exact stats, but I would say a fair number of visitors have smart wallet as their primary wallet |
Got it. Let us discuss this with Coinbase directly and see what is the best path to move forward. |
I keep getting
invalid raw signature lenght
when callingsignOffchainAttestation
with signer derived from Coinbase Smart Wallet. Same code works fine with EOA.Is it a known issue by any chance where ethers fails to validate typed signature created by smart account wallets?
The text was updated successfully, but these errors were encountered: