Safe Hash

Addresses, signatures & time

safe transaction hash

Compute a Safe multisig transaction’s safeTxHash, domain hash and message hash from its fields, the same values a Ledger or Trezor displays. Reads the Safe’s version and nonce, double-checks against the contract’s own getTransactionHash(), decodes the calldata and every call in a MultiSend batch, and flags delegatecalls.

the transaction, exactly as your safe ui / wallet shows it
gas & refund fields (usually all 0)
try
hashes to compare before you sign
safeTxHash
0xc9abe3a2a683fe21775045d223852becce211a6b2b00f6581ebb37241271b4c0the safe app and most wallets show this
domain hash
0x561d71a273896bbd4ecfb3e135730658c966531ed15bdee93660d109a8970f01a ledger shows this…
message hash
0xe437646bca1140bdbc626677f74052fa894d66a8c647620180db05581011a2db…and this, when you sign on the device
what it does

looking up the function…

good to know

why verify the hash at all?

your hardware wallet only shows a hash. if the safe interface was tampered with (as in the bybit hack), the hash it asks you to sign won’t match the transaction you think you’re approving. computing it yourself from the fields is the check.

what are the domain hash and message hash?

the two halves of the eip-712 digest. a ledger shows both when you sign a safe transaction; the safeTxHash is keccak256(0x1901 ‖ domain hash ‖ message hash).

when is a delegatecall ok?

when it targets safe’s own MultiSend / MultiSendCallOnly, which is how batches run. a delegatecall anywhere else runs foreign code with full control of the safe.