<p>The existing V1 Plutus script just needs to be recompiled and serialised as V2. See this example of a minting policy serialised as both V1 and V2 for guidance, <a href="https://github.com/james-iohk/plutus-scripts/blob/master/src/TokenNamePolicy.hs" rel="noreferrer">https://github.com/james-iohk/plutus-scripts/blob/master/src/TokenNamePolicy.hs</a>.</p>
<p>Then you can create an output with the V2 script attached to be referenced in a transaction. See example using cardano-cli here: <a href="https://github.com/input-output-hk/cardano-node/blob/master/scripts/babbage/example-babbage-script-usage.sh" rel="noreferrer">https://github.com/input-output-hk/cardano-node/blob/master/scripts/babbage/example-babbage-script-usage.sh</a></p>

CC BY-SA 4.0
2022-07-11T11:13:19.480Z
2022-07-11T11:13:19.480Z
james
<p>One of the fun things, the Vasil hardfork gives us is the ability to reduce the size of transactions and so put more of them into a block (speeding up the chain).</p>
<p>My question is how to change the preexisting Plutus smart contracts I have written to take advantage of this? I think the following would be nice to have if you could point me to them please:</p>
<ol>
<li><p>example of an old plutus contract and its vasil counterpart (highlighting the changes made and why)</p>
</li>
<li><p>A list of all possible changes I could make.</p>
</li>
</ol>

<plutus><smart-contract><vasil-hard-fork><reference-scripts>
How To Convert Old Plutus Scripts to Vasil Reference Scripts?
# How To Convert Old Plutus Scripts to Vasil Reference Scripts?

(Asked by: username_0 on 2022-06-29)

One of the fun things, the Vasil hardfork gives us is the ability to reduce the size of transactions and so put more of them into a block (speeding up the chain).

My question is how to change the preexisting Plutus smart contracts I have written to take advantage of this? I think the following would be nice to have if you could point me to them please:

1. example of an old plutus contract and its vasil counterpart (highlighting the changes made and why)
2. A list of all possible changes I could make.

**Tags:** plutus, smart-contract, vasil-hard-fork, reference-scripts

---

## 1 answers

### Answer by username_1 on 2022-07-11. Score: 6 | Accepted answer

The existing V1 Plutus script just needs to be recompiled and serialised as V2. See this example of a minting policy serialised as both V1 and V2 for guidance, <https://github.com/james-iohk/plutus-scripts/blob/master/src/TokenNamePolicy.hs>.

Then you can create an output with the V2 script attached to be referenced in a transaction. See example using cardano-cli here: <https://github.com/input-output-hk/cardano-node/blob/master/scripts/babbage/example-babbage-script-usage.sh>


---

