-
Notifications
You must be signed in to change notification settings - Fork 143
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
SIWE doesn't work with ERC-4337 (and pre-deployed contracts in general) #148
Comments
here's how to implement ERC-6492: AmbireTech/signature-validator#3 or the signature-validator library can be used directly Alternatively, if you don't wanna use the library, you have to rewrite this method siwe/packages/siwe/lib/utils.ts Lines 16 to 32 in 903faa9
variables are 100% equivalent but the names are different if you don't feel comfortable with copy pasting the magic contract, you can compile it from source by doing |
Taking a look at this and also very excited for AA and Sign-In with Ethereum. We'll take a look at what compatibility would look like here - and thank you for the example @Ivshti ! |
Not news on this? |
here's something that may help integrating ERC-6492: #153 (comment) |
is there any kind of timeline/roadmap available on when SIWE will support eips 4337/6492? |
hey @obstropolos, any update? |
just started working on a 6492 sign-in implementation and also find myself in this thread. really want to use SIWE but current lack of support means I need to fall back to use ambire tech or viems verifying libraries, which are great, but techincally dont match the SIWE spec. would love to see this |
FWIW, 6492 is built into Viem's SIWE implementation. Would highly recommend using it. :D |
Right now, SIWE uses ERC-1271 to validate signatures from contract accounts, but it only works if the contract is already deployed. If the contract is pre-deployed (aka "counterfactually deployed"), SIWE won't work.
Pre-deployed contract accounts are becoming increasingly common due to the popularity of ERC-4337, which doesn't deploy the contract account until the first transaction. That was the motivation behind EIP-6492. cc @Ivshti
TLDR: SIWE should implement EIP-6492. Even though the EIP is not yet accepted, implementing 6492 won't break compatibility with existing wallets, and it will ensure that SIWE works with ERC-4337 which is becoming increasingly popular.
The text was updated successfully, but these errors were encountered: