tonscan icon indicating copy to clipboard operation
tonscan copied to clipboard

How do you generate msg hash?

Open fishTsai20 opened this issue 5 months ago • 0 comments

src_tx_hash:'8do0P2NEK7qtycZHniERQWGQ9Wy7BJQKtarpMkOa/gw=' hash:'5cOyEmX7zMOffQ41NkjeEuAfVaAFbGis8wIExCxlOVI=' src:'EQCN8t4vcAdfIinTuARZ49Ue3Wbx4XPUUET2KgVu579AhnYv' dest:'EQDkLxDcJbXAlP3pzhrK6BRVLgYB538FENOIUQSBTWR6GypP' the way we parse message.hash as below

message tlb.Message
msgCell, err := tlb.ToCell(message.Msg)
msg.Hash = msgCell.Hash()
hash = base64.StdEncoding.EncodeToString(msg.Hash)

https://tonscan.org/tx/f1da343f63442bbaadc9c6479e2111416190f56cbb04940ab5aae932439afe0c But tonscan's message hash is 'ZpxcGqC4otnm2wIXgrSTMGaEmAe7f5UKgkPHV+bpNMQ='

fishTsai20 avatar Sep 04 '24 08:09 fishTsai20