user127: If I have the following transaction:
cardano-cli transaction build                 \
--tx-in dd3dbc1cbd4627da3b74fae8c7bcc3f05f3b41ec36feb33f81cf885390b634d6#0      \
--tx-in 40917b278a9bf960fcc0a3de9eb5945113c025323d7d73c19dd6d26cfe92e04b#0      \
--tx-in e98a07b5ff0b048950ce4ffdfbfb53def61e2b52e9bf39cdd82b3eb91c40e2a6#0 \
--tx-in-script-file plutus/order-v11-buy-token.plutus   \
--tx-in-datum-file 'tmp/batch_datum_file_0.json'   \
--tx-in-redeemer-file 'plutus/match-order-redeemer.json'  \
--tx-in 2c759a6606692c021c266025cbd569a1b451e184fb44e001d18152528a3a2161#0 \
--tx-in-script-file plutus/order-v11-buy-token.plutus   \
--tx-in-datum-file 'tmp/batch_datum_file_1.json'   \
--tx-in-redeemer-file 'plutus/match-order-redeemer.json'  \
--tx-in cfbf555aebbf879e2313c32f4d8b839d63d7f7b12fd1027cb3ccd7e9f790e014#0 \
--tx-in-script-file plutus/order-v11-buy-ada.plutus   \
--tx-in-datum-file 'tmp/batch_datum_file_2.json'   \
--tx-in-redeemer-file 'plutus/match-order-redeemer.json'  

I am getting the following error:
Command failed: transaction build  Error: The following scripts have execution failures:
the script for transaction input 0 (in the order of the TxIds) failed with: 
The Plutus script evaluation failed: An error has occurred:  User error:
The provided Plutus code called 'error'.
Script debugging logs: 
the script for transaction input 4 (in the order of the TxIds) failed with: 
The Plutus script evaluation failed: An error has occurred:  User error:
The provided Plutus code called 'error'.

How to realize which scripts reported the error, it is saying the script for transaction input 0 and the script for transaction input 4 but with the above command, I cannot find on tx-in position 0 any script. How to determine the order of transaction input (in the order of the TxIds)?

user127: Looks like all --tx-in is not in the order like it is provided in cardano-cli command and rather is order ascending by transaction id.

127: <p>If I have the following transaction:</p>
<pre><code>cardano-cli transaction build                 \
--tx-in dd3dbc1cbd4627da3b74fae8c7bcc3f05f3b41ec36feb33f81cf885390b634d6#0      \
--tx-in 40917b278a9bf960fcc0a3de9eb5945113c025323d7d73c19dd6d26cfe92e04b#0      \
--tx-in e98a07b5ff0b048950ce4ffdfbfb53def61e2b52e9bf39cdd82b3eb91c40e2a6#0 \
--tx-in-script-file plutus/order-v11-buy-token.plutus   \
--tx-in-datum-file 'tmp/batch_datum_file_0.json'   \
--tx-in-redeemer-file 'plutus/match-order-redeemer.json'  \
--tx-in 2c759a6606692c021c266025cbd569a1b451e184fb44e001d18152528a3a2161#0 \
--tx-in-script-file plutus/order-v11-buy-token.plutus   \
--tx-in-datum-file 'tmp/batch_datum_file_1.json'   \
--tx-in-redeemer-file 'plutus/match-order-redeemer.json'  \
--tx-in cfbf555aebbf879e2313c32f4d8b839d63d7f7b12fd1027cb3ccd7e9f790e014#0 \
--tx-in-script-file plutus/order-v11-buy-ada.plutus   \
--tx-in-datum-file 'tmp/batch_datum_file_2.json'   \
--tx-in-redeemer-file 'plutus/match-order-redeemer.json'  
</code></pre>
<p>I am getting the following error:</p>
<pre><code>Command failed: transaction build  Error: The following scripts have execution failures:
the script for transaction input 0 (in the order of the TxIds) failed with: 
The Plutus script evaluation failed: An error has occurred:  User error:
The provided Plutus code called 'error'.
Script debugging logs: 
the script for transaction input 4 (in the order of the TxIds) failed with: 
The Plutus script evaluation failed: An error has occurred:  User error:
The provided Plutus code called 'error'.
</code></pre>
<p>How to realize which scripts reported the error, it is saying <code>the script for transaction input 0</code> and <code>the script for transaction input 4</code> but with the above command, I cannot find on tx-in position 0 any script. How to determine the order of transaction input (in the order of the TxIds)?</p>
 127: <p>Looks like all <code>--tx-in</code> is not in the order like it is provided in <code>cardano-cli</code> command and rather is order ascending by transaction id.</p>
