I'm trying to figure out how to get the transaction hash for some transactions. I don't have the hashes in my data; all I have is approximate time (to the minute), size, and token. I think I can get the raw transaction hex. I want to get the transaction hash. I looked at this post: How to get raw ethereum transaction hash but when I hashed the raw hex myself I didn't get the same hash as the poster, so I don't know what I'm doing wrong. I hashed it with and without the '0x' before thinking that that was the problem, but it wasn't.
1 Answer
I hashed the raw hex (f86c258502540be40083035b609482e041e84074fc5f5947d4d27e3c44f824b7a1a187b1a2bc2ec500008078a04a7db627266fa9a4116e3f6b33f5d245db40983234eb356261f36808909d2848a0166fa098a2ce3bda87af6000ed0083e3bf7cc31c6686b670bd85cbc6da2d6e85
) from your link using Keccak256 and got 58e5a0fc7fbc849eddc100d44e86276168a8c7baaa5604e44ba6f5eb8ba1b7eb
, same as that of the poster. Note: You have to rid the 0x
of the raw hex before hashing it.
-
I don't get that. When I plug in the same number, I get the hash "94bc16b7b18d195bd5d5938d16acba217aa27f0d4488e6bdb7e34745d838c484". I took out the 0x. Commented Nov 23, 2022 at 21:39
-
1You need to change the input type to "Hex", not "Text", before hashing. Commented Nov 23, 2022 at 22:18
-