In my project, I want to know what the TransOrd do.
Dec 8, 2023, 10:16 AM
to see who transfer to whom how many ton.
for one json I can parse it like this:
{
"chain": "TON_TESTNET",
"txid": "1a0abf5db9bf52bdce4e6c1a632d721eecb7711918f4297ae68db4818bc5f410",
"transferTimestamp": 1702028203000,
"blockNum": 16397192,
"confirmations": -1307875,
"result": true,
"remark": "SUCCESS",
"feeSymbol": "TON",
"feeAmountCoin": "0.000333343",
"feeSymbolPrice": "2.294675485035269",
"feeAmountUsdt": "0.000764914010208111674267",
"transfers": [
{
"transferType": "TRANSFER",
"fromAddress": "0:507dea7d606f22d9e85678d3eede39bbe133a868d2a0e3e07f5502cb70b8a512",
"toAddress": "0:deaae6518a11fd24c1da9c53ad38aedd35f4a66d1bef4f1e3081472d9276a920",
"operatorAddress": "",
"symbol": "TON",
"contract": "TON",
"amount": "0.00023",
"amountInUsdt": "0.00052777536155811187",
"logIdx": 0
}
]
}
"chain": "TON_TESTNET",
"txid": "1a0abf5db9bf52bdce4e6c1a632d721eecb7711918f4297ae68db4818bc5f410",
"transferTimestamp": 1702028203000,
"blockNum": 16397192,
"confirmations": -1307875,
"result": true,
"remark": "SUCCESS",
"feeSymbol": "TON",
"feeAmountCoin": "0.000333343",
"feeSymbolPrice": "2.294675485035269",
"feeAmountUsdt": "0.000764914010208111674267",
"transfers": [
{
"transferType": "TRANSFER",
"fromAddress": "0:507dea7d606f22d9e85678d3eede39bbe133a868d2a0e3e07f5502cb70b8a512",
"toAddress": "0:deaae6518a11fd24c1da9c53ad38aedd35f4a66d1bef4f1e3081472d9276a920",
"operatorAddress": "",
"symbol": "TON",
"contract": "TON",
"amount": "0.00023",
"amountInUsdt": "0.00052777536155811187",
"logIdx": 0
}
]
}
but for another get this:
{
"chain": "TON_TESTNET",
"txid": "dd979231ce0dc18d6fd019daae4d91fce87f05ca06d4e54bcfeb552997b5bf07",
"transferTimestamp": 1702028496000,
"blockNum": 16397394,
"confirmations": -1308060,
"result": true,
"remark": "SUCCESS",
"feeSymbol": "TON",
"feeAmountCoin": "0.000991073",
"feeSymbolPrice": "2.29477546653869",
"feeAmountUsdt": "0.00227429000594889911437",
"transfers": []
}
"chain": "TON_TESTNET",
"txid": "dd979231ce0dc18d6fd019daae4d91fce87f05ca06d4e54bcfeb552997b5bf07",
"transferTimestamp": 1702028496000,
"blockNum": 16397394,
"confirmations": -1308060,
"result": true,
"remark": "SUCCESS",
"feeSymbol": "TON",
"feeAmountCoin": "0.000991073",
"feeSymbolPrice": "2.29477546653869",
"feeAmountUsdt": "0.00227429000594889911437",
"transfers": []
}
I use this code: t.cvtTransfers(transaction.GetInMsg(), transaction.GetOutMsgs(), price2USD)
Dec 8, 2023, 10:20 AM
Because the transfer address is still negative. Change the OA.
Which is the reason for TransOrd.
Dec 8, 2023, 10:21 AM
my procedure can not get the right result because no outmsgs.
still negative is what?
how to change the OA?
I am a simple developer with ton. I always make mistake.
can you explain to me more details.
I even don't know what is OA.
the two transactions are both success.
Dec 8, 2023, 10:24 AM
We call that operator address :D.
I know. But it leads to a 0 output.
I’ll send you the details over. We came across the same issue.
Dec 8, 2023, 10:25 AM
the no output transaction is caused by the ton bot. faucet.
Dec 8, 2023, 10:28 AM
Check your inbox.
Dec 8, 2023, 10:28 AM
any other dev can help me?
my boss want me to get the "who transfer whom how may ton".
[
{
"fromAddress": "0:507dea7d606f22d9e85678d3eede39bbe133a868d2a0e3e07f5502cb70b8a512",
"toAddress": "0:deaae6518a11fd24c1da9c53ad38aedd35f4a66d1bef4f1e3081472d9276a920",
"amount": "0.00023",
}
]
{
"fromAddress": "0:507dea7d606f22d9e85678d3eede39bbe133a868d2a0e3e07f5502cb70b8a512",
"toAddress": "0:deaae6518a11fd24c1da9c53ad38aedd35f4a66d1bef4f1e3081472d9276a920",
"amount": "0.00023",
}
]
I can get the result even no out_msgs.
but I don't know the deep reason.
If I don't understand the deep reason, my procedure may have a hole, a bug.
means 0-255 is all ok.
I can change my procedure.
{
"chain": "TON_TESTNET",
"txid": "dd979231ce0dc18d6fd019daae4d91fce87f05ca06d4e54bcfeb552997b5bf07",
"transferTimestamp": 1702028496000,
"blockNum": 16397394,
"confirmations": -1307359,
"result": true,
"remark": "SUCCESS",
"feeSymbol": "TON",
"feeAmountCoin": "0.000991073",
"feeSymbolPrice": "2.306550222706572",
"feeAmountUsdt": "0.002285959648868470431756",
"transfers": [
{
"transferType": "TRANSFER",
"fromAddress": "0:92112d13658a9c56482882e8486fc88c128e1cbda130988ad4e6a6d082737c7e",
"toAddress": "0:deaae6518a11fd24c1da9c53ad38aedd35f4a66d1bef4f1e3081472d9276a920",
"operatorAddress": "",
"symbol": "TON",
"contract": "TON",
"amount": "5",
"amountInUsdt": "11.53275111353286",
"logIdx": 0
}
]
}
"chain": "TON_TESTNET",
"txid": "dd979231ce0dc18d6fd019daae4d91fce87f05ca06d4e54bcfeb552997b5bf07",
"transferTimestamp": 1702028496000,
"blockNum": 16397394,
"confirmations": -1307359,
"result": true,
"remark": "SUCCESS",
"feeSymbol": "TON",
"feeAmountCoin": "0.000991073",
"feeSymbolPrice": "2.306550222706572",
"feeAmountUsdt": "0.002285959648868470431756",
"transfers": [
{
"transferType": "TRANSFER",
"fromAddress": "0:92112d13658a9c56482882e8486fc88c128e1cbda130988ad4e6a6d082737c7e",
"toAddress": "0:deaae6518a11fd24c1da9c53ad38aedd35f4a66d1bef4f1e3081472d9276a920",
"operatorAddress": "",
"symbol": "TON",
"contract": "TON",
"amount": "5",
"amountInUsdt": "11.53275111353286",
"logIdx": 0
}
]
}
Hope there are no bugs。
when the msg have out_msgs the in_msg have no source field.
when the msg don't have out_msgs the in_msg have source.
So interesting, so strange, so incomprehensible, hahaha, my off work time is up, I will continue tomorrow.
Dec 8, 2023, 11:05 AM
in_msg may be external-in which comes from any party in the internet without any direct linking to some address in blockchain.
this is exactly how wallets work in TON: they are triggered by external-in messages that are coming from your wallet app.
Dec 8, 2023, 11:07 AM
Make sure to check out transaction chains on tonviewer.com: it shows graphs which may prove useful.
Dec 8, 2023, 11:10 AM
ok nice thank you.
Dec 8, 2023, 11:11 AM