I was wondering if there is more info on how thee compiling of plutus scripts to plutus core is done. When I look at all examples on github [1] they are all structured the same.
There is a script.hs that contains the logic for validation.
There is a cabal file that says what the build is and how it is done with dependencies.
There is a main.hs that compiles the script.hs to plutus core.
This is the first time I used a DSL and this way of compiling is new to me. What is unknown to me is how to setup the main.hs to correctly compile the written script to plutus core. I recognize a general structure of each of these fails in the above mentioned repository but can not extract the general way of how this works. Could someone help me with this?
Thank you! So if I am correct, the main.hs only has to execute the writeFileTextEnvelop filename Nothing scriptSerial to correctly compile the template haskell code to a serialized PlutusScriptV1. All other ectra function defined here are for debugging and statistics purposes only. This is clear!