Skip to content
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

EIP712, motivates switching chain for signing #8610

Closed
Aniket965 opened this issue May 29, 2024 · 8 comments
Closed

EIP712, motivates switching chain for signing #8610

Aniket965 opened this issue May 29, 2024 · 8 comments
Labels
bug If this is a PR, this PR fixes a bug. If this is an issue, this issue reports a bug.

Comments

@Aniket965
Copy link

Pull Request

No response

What happened?

first of all sorry i know its not a bug, but i am not able to create post on ethereum magician portal so made it here ,feel free to close it.

EIP712, introduced eth_signTypedData which takes on typed data, this method is used by wallets and they show nice ui where they show this typedData to user, this make easier for user to undestand what they are signing.
problem is when they have to sign it they have to switch to that chain although i dont see a very clear point why they have to do it eip712 takes domain seperater which have chainId, which makes it a chain specific signature which is good but it only takes chainId which should not require connecting to that chain.

it is possible to sign eip712 message without switching chain but rn do which means finding message hash of this signedTypeData and aksing user to sign it, the wallet doesnt show typed data ui for it. i think EIP712 motivates wallets to use eth_signTypedData so they implements it that way. it will be good if this behaviour can be changed

Relevant log output

No response

@Aniket965 Aniket965 added the bug If this is a PR, this PR fixes a bug. If this is an issue, this issue reports a bug. label May 29, 2024
@Aniket965 Aniket965 changed the title EIP712, motivates swithching chain for signing EIP712, motivates switching chain for signing May 29, 2024
@KARINACAREPOTO
Copy link

Solicitud de extracción

Ninguna respuesta

¿Qué pasó?

En primer lugar, lo siento, sé que no es un error, pero no puedo crear una publicación en el portal de magos de Ethereum, así que la hice aquí, no dudes en cerrarla.

EIP712, introducido, eth_signTypedData que acepta datos escritos, este método lo utilizan las billeteras y muestran una interfaz de usuario agradable donde muestran estos datos escritos al usuario, esto hace que sea más fácil para el usuario entender lo que está firmando. El problema es que cuando tienen que firmarlo, tienen que cambiar a esa cadena, aunque no veo un punto muy claro por qué tienen que hacerlo. eip712 toma un separador de dominio que tiene chainId, lo que la convierte en una firma específica de la cadena, lo cual es bueno, pero solo toma chainId que no debería requerir la conexión a esa cadena.

Es posible firmar el mensaje eip712 sin cambiar la cadena, pero puedo hacerlo, lo que significa encontrar el hash del mensaje de este TypeData firmado y pedirle al usuario que lo firme, la billetera no muestra la interfaz de usuario de los datos escritos. Creo que EIP712 motiva a las billeteras a usarlo, eth_signTypedData por lo que lo implementan de esa manera. Sería bueno si este comportamiento se pudiera cambiar.

Salida de registro relevante

Ninguna respuesta

Confirma

@xinbenlv
Copy link
Contributor

xinbenlv commented Jun 5, 2024

@Aniket965, welcome to EIP repo. Thank you for post.

QQ: this is a technical comment on EIP-712, can you post it on Ethereum Magician? If you have difficulty posting it on Ethereum Magician please let us know. (I'd also suggest you clarify "this behaviour can be changed" what is required here)

@bumblefudge
Copy link
Contributor

hey @Aniket965 , yeah this will be closed as off-topic. eth-magicians is powered by Discourse, which by default doesn't let brand-new users post new threads. Check your inbox for instructions, all new users get a message like this explaining the rules:

image

Your question sounds like it might actually be a question for metamask or viem, tho, I'm not sure EIP712 has any opinion about network connections (which should be on a lower layer?)

@jxom
Copy link
Contributor

jxom commented Jun 5, 2024

Your question sounds like it might actually be a question for metamask or viem, tho

Definitely a question for the Wallet.

@bumblefudge
Copy link
Contributor

@jxom sorry to trigger your google alert here, i was just throwing out ideas at random not really understanding the question 🙈

@Aniket965
Copy link
Author

thank you, make sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug If this is a PR, this PR fixes a bug. If this is an issue, this issue reports a bug.
Projects
None yet
Development

No branches or pull requests

6 participants
@xinbenlv @jxom @Aniket965 @bumblefudge @KARINACAREPOTO and others