I am confused with the tx_in
and tx_out
schema on Cardano dbsync and the transaction process as a whole. For example:
Alice has 10000 ADA distributed as 3000, 5000 and 2000 ADA in three different EUTXOs. If she wants to send 6000 ADA to Bob then she can sends two EUTXOs to Bob, e.g. 5000 and 2000 ADA (total 7000 ADA) and receives a new EUTXOs of 1000 ADA back, right?.
For Alice, are those 7000 ADA stored in the tx_out
table and the 1000 ADA in the tx_in
table? Will she get the 1000 ADA back into the same address or a different one? If she receives the 1000 ADA back to a different address, will the same transaction block contain both transaction, i.e. address used to send ADA to Bob and the other address used to receive ADA back? Will they have the same transaction id?