Hi how do i get tx hash from wallet.methods.transfer.send in tonweb ?
I dont see anything in the response that could point me to it
Sep 11, 2022, 7:15 PM
The concept of a txhash is a little different in TON because a single transaction you send to a contract can result in multiple txhashes. TON works by sending asynchronous messages between contracts. These messages can even be handled on different blocks. When a contract receives a message, it can send another message as a response, so the first message you sent in your transaction can cause additional "transactions" to be created
It's very different from Ethereum where everything is atomic and synchronous and a single txhash can tell the whole story of whether what you wanted to do succeeded or failed
Sep 11, 2022, 9:10 PM
Well i still need to know the status of a txn(and/or subsequent txns that are created) and read the input of the given txn(perhaps at some backend for some verification).
Is there seriously no way to track this?
Is there seriously no way to track this?
Sep 12, 2022, 5:09 PM
there's but it requires a lot of code
Sep 12, 2022, 5:13 PM
wow
Sep 12, 2022, 5:13 PM
you need to check every transaction of the account and find one with your exact body, then you need to follow every output message and match txes in recipient addresses by lt
Sep 12, 2022, 5:14 PM
that sounds like extra gymnastics for something trivial, but thanks for your help Tim
Sep 12, 2022, 5:14 PM
and ofc you do it recursively
Sep 12, 2022, 5:14 PM
i guess i'll have to go that way
Sep 12, 2022, 5:14 PM
https://tonapi.io/transaction/4c6e8ee2d7fc94cf5b7bb78d2ad2d1086e9c3f7508f5f458c3bb24e1bbcff0be tonapi does that, you can checkout their traces
yes, it's too much extra for ton, so you probably don't need to do all that and just check that seqno is incremented or your tx present in your wallet
I would also recommend using highload wallet. That way you can send queries in parallel and check that your query id is present.
Sep 12, 2022, 5:17 PM
I think that the recursive code that loads all transactions that originate from your original transactions and checks the exit code of all of them is a “core” functionality that all ton libraries will eventually support. It’s just that this use-case is not yet in high demand so you don’t see it implemented yet
Most simple TON transfers are just one transaction
Jetton transfers are a bit more
Most simple TON transfers are just one transaction
Jetton transfers are a bit more
Sep 12, 2022, 5:20 PM
It's doable to just check all exit codes, but it's very hard to react to them. What do you do if you wanted tx chain with length 7 and it exited on 5
tonutils-go by the way implemented confirmation of tx minting on blockchain
Sep 12, 2022, 5:22 PM
Yes, it’s a bit complicated because possibly just one final notification has failed and the entire flow wasn’t undone
Sep 12, 2022, 5:23 PM