solidity
solidity copied to clipboard
Add `hashStruct()` for EIP-712 struct hash computation
Opening new issue as discussed here: https://github.com/ethereum/solidity/issues/14157#issuecomment-1537226011
Abstract
Let's add function type(S).hashStruct(s) to compute bytes32 hash from S memory s or S calldata s argument where S is struct compatible with EIP-712.
Motivation
EIP-712 is pretty popular among Solidity projects, recently typehash() function were requested to be implemented here: https://github.com/ethereum/solidity/issues/14157. Having function to compute struct instance hash would be one more adoption step for this EIP.
Specification
Implementation details could be borrowed form here: https://eips.ethereum.org/EIPS/eip-712
Backwards Compatibility
Not required
This issue has been marked as stale due to inactivity for the last 90 days. It will be automatically closed in 7 days.
This is still relevant.
it is.
This issue has been marked as stale due to inactivity for the last 90 days. It will be automatically closed in 7 days.
This is still relevant. Don't close.
Would love to see this!
This issue has been marked as stale due to inactivity for the last 90 days. It will be automatically closed in 7 days.
This is still relevant. Don't close.
This issue has been marked as stale due to inactivity for the last 90 days. It will be automatically closed in 7 days.
Please dont