<p>No it won't. The script needs to only be provided once. This is generally true for any witness in transactions. For example, if two or more inputs require a signature from a same signing key, only one signature is needed to validate all inputs.</p>

CC BY-SA 4.0
2021-11-24T12:31:22.493Z
2021-11-24T12:31:22.493Z
KtorZ
<p>If there are multiple <code>--tx-in-script-file</code> for the same plutus script file only with different utxos is that means that multiple times will be sent plutus script and that will affect the size of a transaction?
For example:</p>
<pre><code>SCRIPT=AlwaysSucceeds.plutus
...
  --tx-in 941a7f0159053338f4ee97c19b2d3fcf802f137a4d6bdac301871a37da72e97a#1 \
  --tx-in-script-file $SCRIPT \
  --tx-in-datum-value 20 \
  --tx-in-redeemer-value 1 \
  --tx-out addr_test1qqp6z9xneafqp0ndrxgyjd3qecs4tf6ktqhvj2hyc5efg2gzq5lqcm6rfuv6yp0mtsgc2qxvwlwr938qk2nue0rqg6rqxewe52+11900000 \
  \
  --tx-in c5692c4242bfd6a52b1eb33ada17fe65a7291644baeec08644b3df8bfdb0267a#1 \
  --tx-in-script-file $SCRIPT \
  --tx-in-datum-value 30 \
  --tx-in-redeemer-value 100 \
  --tx-out addr_test1qz270xngvhp50nvc5cxktsuh6tf7s3sanh5gyqr4dphx6qzdvmtrj9qmssswlxaty64q9xukz3z3xecqch6hvfcn8tqq0g3wej+1400000+&quot;60 29856eae5151337853ffbd8fd80df78dab8c7f09c37c95799328abb8.RTOK&quot; \
...
</code></pre>
<p>Does this mean that size of the transaction will be increased for the size of the script 2 times, or just once independent of how many times is added?</p>

CC BY-SA 4.0
2021-11-23T11:15:37.340Z
I think the script is only included once in the final transaction, even if you supply it twice. The best way to check though would be to build the transaction both ways and check if the `transaction.raw` files differ in size.
Thom
CC BY-SA 4.0
2021-11-23T23:21:57.073Z
In the transaction, I have 3 utxos that are consuming from the script and when I remove one of them, the transaction file size from 2059B comes to 1563B. I have datum and redeemer also removed but it looks like it is sending a copy of the script for every utxo.
zarej
<smart-contract><cardano-cli><transaction>
Will the size of transaction be affected if the same input script is provided multiple times for different utxos?
# Will the size of transaction be affected if the same input script is provided multiple times for different utxos?

(Asked by: username_0 on 2021-11-23)

If there are multiple --tx-in-script-file for the same plutus script file only with different utxos is that means that multiple times will be sent plutus script and that will affect the size of a transaction?
For example:
SCRIPT=AlwaysSucceeds.plutus
...
  --tx-in 941a7f0159053338f4ee97c19b2d3fcf802f137a4d6bdac301871a37da72e97a#1 \
  --tx-in-script-file $SCRIPT \
  --tx-in-datum-value 20 \
  --tx-in-redeemer-value 1 \
  --tx-out addr_test1qqp6z9xneafqp0ndrxgyjd3qecs4tf6ktqhvj2hyc5efg2gzq5lqcm6rfuv6yp0mtsgc2qxvwlwr938qk2nue0rqg6rqxewe52+11900000 \
  \
  --tx-in c5692c4242bfd6a52b1eb33ada17fe65a7291644baeec08644b3df8bfdb0267a#1 \
  --tx-in-script-file $SCRIPT \
  --tx-in-datum-value 30 \
  --tx-in-redeemer-value 100 \
  --tx-out addr_test1qz270xngvhp50nvc5cxktsuh6tf7s3sanh5gyqr4dphx6qzdvmtrj9qmssswlxaty64q9xukz3z3xecqch6hvfcn8tqq0g3wej+1400000+"60 29856eae5151337853ffbd8fd80df78dab8c7f09c37c95799328abb8.RTOK" \
...

Does this mean that size of the transaction will be increased for the size of the script 2 times, or just once independent of how many times is added?

**Tags:** smart-contract, cardano-cli, transaction
> **Comments:**
> **username_1**: I think the script is only included once in the final transaction, even if you supply it twice. The best way to check though would be to build the transaction both ways and check if the `transaction.raw` files differ in size.  
> **username_0**: In the transaction, I have 3 utxos that are consuming from the script and when I remove one of them, the transaction file size from 2059B comes to 1563B. I have datum and redeemer also removed but it looks like it is sending a copy of the script for every utxo.  

---

## 1 answers

### Answer by username_2 on 2021-11-24. Score: 3 | Accepted answer

No it won't. The script needs to only be provided once. This is generally true for any witness in transactions. For example, if two or more inputs require a signature from a same signing key, only one signature is needed to validate all inputs.


---

