<p>You can find a good example in <a href="https://github.com/input-output-hk/Alonzo-testnet/blob/main/Alonzo-solutions/exercise4/Exercise4-solution.md" rel="nofollow noreferrer">Exercise4-solution</a> of Alonzo-testnet program.</p>
<p>Source code is here: <a href="https://github.com/input-output-hk/Alonzo-testnet/tree/main/resources/plutus-sources/plutus-helloworld" rel="nofollow noreferrer">plutus-helloworld</a>, if you have any doubt check the code to understand what it does.</p>
<p>Basically you need to:</p>
<ol>
<li>Create an executable <code>plutus-helloworld</code> as defined in <code>plutus-helloworld.cabal</code> file</li>
<li>Compile the plutus file using: <code>cabal run plutus-helloworld -- 1 helloworld2.plutus</code></li>
<li>Build the address: <code>cardano-cli address build --payment-script-file helloworld2.plutus --testnet-magic 8 --out-file helloworld2.addr</code></li>
</ol>
<p>Then you can follow the exercise solution.</p>

CC BY-SA 4.0
2021-11-09T15:46:58.900Z
2021-11-09T15:46:58.900Z
georgeos
<p>How do I export my .hs contract to .Plutus? Please provide step by step guidance.</p>

<plutus><smart-contract>
How do I export my .hs contract to .Plutus?
# How do I export my .hs contract to .Plutus?

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

How do I export my .hs contract to .Plutus? Please provide step by step guidance.

**Tags:** plutus, smart-contract

---

## 1 answers

### Answer by username_1 on 2021-11-09. Score: 2

You can find a good example in [Exercise4-solution](https://github.com/input-output-hk/Alonzo-testnet/blob/main/Alonzo-solutions/exercise4/Exercise4-solution.md) of Alonzo-testnet program.

Source code is here: [plutus-helloworld](https://github.com/input-output-hk/Alonzo-testnet/tree/main/resources/plutus-sources/plutus-helloworld), if you have any doubt check the code to understand what it does.

Basically you need to:

1. Create an executable `plutus-helloworld` as defined in `plutus-helloworld.cabal` file
2. Compile the plutus file using: `cabal run plutus-helloworld -- 1 helloworld2.plutus`
3. Build the address: `cardano-cli address build --payment-script-file helloworld2.plutus --testnet-magic 8 --out-file helloworld2.addr`

Then you can follow the exercise solution.


---

