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

feat: signer: support encoding fixed and dynamic arrays to fully comply with EIP 712 spec #30620

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

naveen-imtb
Copy link

This PR patches the current implementation to resolve this issue.

The test cases in testdata/typed-data.json have been repurposed from the ethers.js repository.

The test cases have been updated to remove the ones that don't have a valid domain separator as EIP-712 messages without a domain separator are not supported by geth.

As an example, the below test case from ethersjs repository has been removed as it is considered invalid.

  {
    "name": "random-33",
    "domain": {},
    "primaryType": "Struct3",
    "types": {
      "EIP712Domain": [],
      "Struct3": [
        {
          "name": "param2",
          "type": "bool"
        }
      ]
    },
    "data": {
      "param2": false
    },
    "digest": "0x1d066e0e8e8e4eaedde581dc40a550c2d6774f57126a6eb0dee143bfb6b3f949"
  },

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

Successfully merging this pull request may close these issues.

Support fixed sized arrays for primitive and custom types to fully comply with EIP 712 specification
1 participant