The replaySafeHash
function in the ReplaySafeWrapper
contract generates a replay-safe hash by wrapping a given hash in an EIP-712 structure. It utilizes the domain separator specific to the contract and the account address to prevent replay attacks across different accounts.
account
(address
): The address of the account that will validate the message hash.hash
(bytes32
): The hash that needs to be wrapped for replay safety.bytes32
): The replay-safe hash computed by wrapping the input hash in an EIP-712 struct.