<p>You are correct, if you have a parametrized script which you did not 'inject' yet with the parameters, you cannot leverage the referencing of the script.</p>
<p>Note that script referencing is also costly, the initial transaction that attaches the script to an output is expensive. You pay for the size you put on the active part of the chain. If your script is used often, you can save these costs by having lower transaction costs when referencing the script. This break even point has to be considered! If you only use it once, you won't get the cost of it out of the usage.</p>
<p>That said, you could also inject this parametrized data via another way! That is, do not parametrize your script, but retrieve the data from a reference input. Important here, do not forget to mark this input with an NFT to make it secure (remember that anybody can send anything anywhere). The location of the NFT + data in datum is your choice. You could make it so that you can update it, or so that you can have multiple instances of it. So, you can reference an unparametrized script this way :)</p>

CC BY-SA 4.0
2022-10-25T06:40:57.577Z
2022-10-25T06:48:01.713Z
2022-10-25T06:48:01.713Z
Fermat
<p>In my understanding, if my script is parameterized, I would need to know the parameters to generate the script and then store it at an address to be later referred. But usually set of possible values for parameters could be very large, so am I right in assuming that design decision of making script parameterized would make me lose the benefit of referencing it?</p>

<plutus><reference-scripts>
Does it make sense to talk of reference script in the context of parameterized script?
# Does it make sense to talk of reference script in the context of parameterized script?

(Asked by: username_0 on 2022-10-25)

In my understanding, if my script is parameterized, I would need to know the parameters to generate the script and then store it at an address to be later referred. But usually set of possible values for parameters could be very large, so am I right in assuming that design decision of making script parameterized would make me lose the benefit of referencing it?

**Tags:** plutus, reference-scripts

---

## 1 answers

### Answer by username_1 on 2022-10-25. Score: 3 | Accepted answer

You are correct, if you have a parametrized script which you did not 'inject' yet with the parameters, you cannot leverage the referencing of the script.

Note that script referencing is also costly, the initial transaction that attaches the script to an output is expensive. You pay for the size you put on the active part of the chain. If your script is used often, you can save these costs by having lower transaction costs when referencing the script. This break even point has to be considered! If you only use it once, you won't get the cost of it out of the usage.

That said, you could also inject this parametrized data via another way! That is, do not parametrize your script, but retrieve the data from a reference input. Important here, do not forget to mark this input with an NFT to make it secure (remember that anybody can send anything anywhere). The location of the NFT + data in datum is your choice. You could make it so that you can update it, or so that you can have multiple instances of it. So, you can reference an unparametrized script this way :)


---

