Incorrect Placement of TypedMessage in ERC-2612
zakrad opened this issue · 2 comments
zakrad commented
Pull Request
No response
What happened?
Issue Description:
Currently, in the provided EIP-2612 typed message structure, the "message," "primaryType," and "domain" fields are incorrectly placed within the "types" scope. According to the EIP-712 specification, these fields should be outside of the "types" scope.
Expected Behavior:
The "message," "primaryType," and "domain" fields should be defined at the top-level scope of the typed message structure, rather than within the "types" scope.
Expected Structure:
{
"types": {
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "version",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"Permit": [
{
"name": "owner",
"type": "address"
},
{
"name": "spender",
"type": "address"
},
{
"name": "value",
"type": "uint256"
},
{
"name": "nonce",
"type": "uint256"
},
{
"name": "deadline",
"type": "uint256"
}
]
},
"primaryType": "Permit",
"domain": {
"name": "erc20name",
"version": "version",
"chainId": "chainid",
"verifyingContract": "tokenAddress"
},
"message": {
"owner": "owner",
"spender": "spender",
"value": "value",
"nonce": "nonce",
"deadline": "deadline"
}
}
Relevant log output
No response
SamWilsn commented
Is this an issue of a misplaced }
? If so, I think that's a reasonable errata to fix in a Final EIP. Could you open a pull request to make the change?
zakrad commented
Ok, I will do it.