diff --git a/EIPS/eip-712.md b/EIPS/eip-712.md index d8909f2c90f070..486359a356c77a 100644 --- a/EIPS/eip-712.md +++ b/EIPS/eip-712.md @@ -414,13 +414,39 @@ To be done before this EIP can be considered accepted: * [x] Finalize specification of structure hashing * [x] Domain separators * [x] Add test vectors -* [ ] Review specification +* [x] Review specification To be done before this EIP can be considered "Final": -* [ ] Implement `eth_signTypedData` in major RPC providers. -* [ ] Implement `web3.eth.signTypedData` in Web3 providers. -* [ ] Implement `keccak256` struct hashing in Solidity. +* [x] Implement `eth_signTypedData` in major RPC providers. +* [x] Implement `web3.eth.signTypedData` in Web3 providers. +* [x] Implement `keccak256` struct hashing in Solidity. + +**Rationale for marking goals as done:** +* `eth_signTypedData` + +MetaMask has had a series of `eth_signTypedData` since 2017 ([article](https://medium.com/metamask/scaling-web3-with-signtypeddata-91d6efc8b290)), and is an accepted standard in the wallet ecosystem. + +* `web3.eth.signTypedData` + +While this api does **not** exist in the web3.js library as of this writing, it is included as an experimental feature in the Ethers library [here](https://medium.com/metamask/scaling-web3-with-signtypeddata-91d6efc8b290). It can also be called from the Web3.js library by using the `sendAsync` method: + +```javascript +web3.currentProvider.sendAsync({ + method: 'eth_signTypedData', + params: [msgParams, from] +``` +In addition, the `signTypedData` function is of limited utility in web3 convenience libraries, as it is generally relevant to the interface that stores the private keys used for signing, and with the excepetionof burner wallets, this is almost always done in practice within a wallet. + +* `keccak256` struct hashing + +While the `keccak256` function in Solidity cannot be invoked directly on structs, the introduction of `abi.encode` gives a sufficient and well-accepted avenue to hashing structs. + +* review of specification + +In the time since EIP-712 has been proposed, it has enjoyed wide ecosystem adoption, and has become the foundation for a number of other EIPs building on top of it. (For example, ERC20 token Permits (transaction-less token approvals) in [EIP-2612](./eip-2612.md).) MetaMask uses EIP-712 for more readable output to present users, and other wallets have followed suit. The widespread traction and use of this EIP over the course of years justify regarding as sufficiently reviewed. + + ## Copyright