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 Encoding shouldn't need the Domain in the types #977

Open
JoseAfonsoThreeSigma opened this issue Oct 10, 2023 · 1 comment
Open

Comments

@JoseAfonsoThreeSigma
Copy link

The Eip712TypedDataEncoder throws when encoding typed data if the "EIP712Domain" is not listed in the TypedData types. But according to the most recent EIP712 spec this shouldn't be necessary, the js lib ethers even fails if this happens with this issue ethers-io/ethers.js#4000

Expected Behavior

The encode function should be able to encode the payload correctly without needing to specify the EIP712 type

Current Behavior

The encode function throws when the EIP712 type isn't defined in the typed payload

Possible Solution

Refactor the code to assume the EIP712 type from the spec

Thank you @juanfranblanco

@juanfranblanco
Copy link
Member

Hi, where is the upgraded spec? https://eips.ethereum.org/EIPS/eip-712 712 is typed data, so you need the types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants