unshETH - Dependencies
EIP712.sol
This is a Solidity contract that provides the implementation for the Ethereum Improvement Proposal (EIP) 712. EIP 712 is a standard for hashing and signing of typed structured data. This contract implements the EIP 712 domain separator and the final step of the encoding to obtain the message digest that is then signed via ECDSA. It does not implement the encoding itself, as that needs to be implemented by the protocols using this contract.
EIP712
A contract that implements the EIP 712 domain separator and the final step of encoding to obtain the message digest.
_domainSeparatorV4
_domainSeparatorV4()
Returns the domain separator for the current chain.
Return Values
- bytes32: The domain separator for the current chain.
_buildDomainSeparator
_buildDomainSeparator(bytes32, bytes32, bytes32)
Builds the domain separator.
Parameters
- typeHash bytes32: Type hash.
- nameHash bytes32: Name hash.
- versionHash bytes32: Version hash.
Return Values
- bytes32: The domain separator.
_hashTypedDataV4
_hashTypedDataV4(bytes32)
Given a hashed struct, this function returns the hash of the fully encoded EIP712 message for this domain.
Parameters
- structHash bytes32: Hashed struct.
Return Values
- bytes32: Hash of the fully encoded EIP712 message.