Note, I only use transaction build-raw because of the metadata part (at least I think that is why transaction build does not work). In your case transaction build might work just fine, so you would not have to compute fees+refund
Thanks man I think I finally understand how to build --tx-in, --tx-out and calculate fees!
Is there any cardano-cli function that I can use to automatically grab the TxHash, TxIx, and Amount? Or do i really need to build a custom script for that?
Yes I know that but what I mean is to get only the values I need like the TxHash , TxIx , and Amount so i don’t need to manually extract them the above command you just posted.
No matter what data source you use, the thing that builds your Tx will have to do some sort of utxo parsing either from txt as above or from json if you use wallet or blockfrost. I guess that is an integral part of the layer above cardano-cli.