Hi is it possible to calculate input and output message hash before sending it. For example, this is my transaction https://testnet.tonscan.org/tx/op5iqZD9X7zsYGFRc0g9R8w2hLiM8Kt3Af10-VZr0Vg= I would like to get jhibs80fCur+fC1q9fgOjjvl43F8ZbcjLfljtzAXYzE= and +lNc/MYo+/G5HGLke13XNgmwvi4W55fc7hGTN1uV6ks= before sending. is that possible?

May 11, 2023, 2:30 PM
Good question! I don't think it is possible to calculate the input and output message hash before sending a transaction.

The reason for this is that you cannot predict whether there have been any previous transactions that may have altered the contract's data. The state of the contract can change dynamically due to the actions of other transactions.
May 15, 2023, 2:20 AM
Sometimes that prediction is possible, however it may produce results differing from actual transaction result.
You need to know import_fee (that you can calculate based on message size), and you can emulate the transaction on local blockchain to get output messages list.
May 15, 2023, 2:24 AM
if in nodejs, it will return a Cell object after signing and call the hash() method of the Cell object to get the hash of in_msg. But I want to find a way to get the hash of the entire transaction
May 15, 2023, 9:03 AM

© 2024 Draquery.com All rights reserved.