Hello.
Do I get it right, that, if user executes a method in Contract A, that uses approved USDT function transferFrom(), then there will be only 2 normal (not internal) transactions: approve from user to USDT contract and user executing method in Contract A?
Sep 4, 2022, 11:15 PM
Do you mean you are approving to use USDT's transferFrom()?
Sep 4, 2022, 11:41 PM
Yes.
User uses USDT approve to allow Contract A send USDT from his address, so Contract A can use transferFrom().
Sep 4, 2022, 11:43 PM
Yeah I guess you can do that. However, with USDT, you have to be extra careful because it is not ERC20-compliant
See https://forum.openzeppelin.com/t/use-safetransferfrom-success-but-use-transferfrom-failed/26445/2
See https://forum.openzeppelin.com/t/use-safetransferfrom-success-but-use-transferfrom-failed/26445/2
Sep 4, 2022, 11:48 PM
I mean, the question was about which normal (not internal) transactions will be made after this. Do I get it right, that there will be two transactions: approve from user to USDT contract, and method_name from user to Contract A? There won't be normal Transfer transaction from user to USDT contract, that will be available on blockchain (since internal transactions do not get stored on blockchain).
Sep 4, 2022, 11:50 PM
That's about right. Just FYI, internal transactions are recorded on the blockchain. It just takes some effort to see them.
Sep 4, 2022, 11:52 PM
Thank you. So, is it wrong?
Sep 4, 2022, 11:54 PM
Hmm.... internal txs are steps to execute the tx which may not be explicitly "recorded". But they are parts of the tx.
Sep 4, 2022, 11:56 PM
Regardless of some of the information obviously being wrong, is there really an accessible way of tracing internal txs?
Sep 5, 2022, 2:04 AM
tenderly?
Sep 5, 2022, 2:10 AM
Can somebody explain please, if this is a swap transaction, then where is the transfer TO user? I see a transfer FROM user, in which he sent his HVT, in first event, but I don't understand where is the reverse transfer in which he gets tokens that he wanted to swap for. Or does it mean, that it is not a swap transaction?
https://bscscan.com/tx/0xd2ec062e4d30c7753c6918e0e68b3026736b3b4aaa8a0d98d6107ec4f71a0ac7#eventlog
https://bscscan.com/tx/0xd2ec062e4d30c7753c6918e0e68b3026736b3b4aaa8a0d98d6107ec4f71a0ac7#eventlog
Sep 5, 2022, 4:00 AM
he sold, so its bnb transfer u are looking for (after the wbnb unwrap/withdraw)
Sep 5, 2022, 5:15 AM
You mean two logs after this withdrawal? But how do you know what these events do?
Sep 5, 2022, 5:30 AM
im not sure event logs are emitted with eth transfer
Sep 5, 2022, 5:32 AM
Ah, you mean BNB transfer, outside any contract?
(We are talking about bsc chain now)
Sep 5, 2022, 5:33 AM
lol sir, bep20 is erc20 and bnb is eth... its just branding
Sep 5, 2022, 5:34 AM
Ye, np, the thing I wanted to clarify is that you are talking about ordinary on chain transaction, not through contract method. But then I still don't understand how this bnb transaction is linked with token transfers in my transaction. Last event I see is transfer WBNB fto proxy address and then two unknown events. How do you know that there must be also a bnb transaction and how to find it?
Sep 5, 2022, 5:39 AM
Sep 5, 2022, 5:41 AM
Understood, thank you!
Sep 5, 2022, 5:44 AM
That's purely SAS, isn't it?
if there was such a tool, i'd use it during live operation in one of our products. but we can't use SAS because the provider could just turn our service off
purely SAS = no way to host it yourself
Sep 5, 2022, 9:52 AM
Closed Sourced
Sep 5, 2022, 10:39 AM
as in you can download a binary?
or just always using their servers?
Sep 5, 2022, 11:53 AM
no, as SAS
such tools should be open sourced, but greed won't let
Sep 5, 2022, 11:55 AM
oh too bad. closed source would maybe have been acceptable under some circumstances. but thanks for the info
being SAS will constrain the tool to analytical purposes
possibly production use by companies that really like to gamble
Sep 5, 2022, 11:56 AM
Yes. Maybe you can strike a deal with them to serve you? AFAIK Etherscan is SAS.
Sep 6, 2022, 12:43 AM
Yeah etherscan is SAS, which is why we don't use it for operational purposes. But for analytical purposes it's perfectly fine
Sep 6, 2022, 8:11 AM