unshETH - Dependencies

ECDSA-II.sol

Note

Split reference

This reference file was too long so it is split into multiple chunks. This is chunk number II.

This is a Solidity file which is part of the Unsheth library and is used to handle Ethereum Signed Typed Data. The file contains a function toTypedDataHash which produces hash corresponding to the one signed with the eth_signTypedData JSON-RPC method as part of EIP-712.

toTypedDataHash

function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32)

This function takes a domainSeparator and a structHash, and returns a keccak256 hash. The function is used for creating Ethereum Signed Typed Data, matching the hash signed with the eth_signTypedData JSON-RPC method as part of EIP-712.

Parameters

  • domainSeparator bytes32: This is used to create a hash
  • structHash bytes32: This is used to create a hash

Return Values

  • bytes32: Return the keccak256 hash
Previous
ECDSA-I.sol