It was mentioned in lecture 1 that in this fourth cohort of the PPP we won't need to learn to write off-chain code in Plutus/Haskell. Nevertheless it appears that testing uses the emulator and it seems to me that Plutus off-chain code might be relevant for writing testing scenarios. Is this correct? Would knowing about the "contract monad" be useful for writing tests?
1 Answer
From Lars' answer in the Q&A:
- First of all, you can still use Haskell in Kuber to do the off-chain part.
- As a side note, it is likely that GeniusYield will soon release a PAB replacement that is also a Haskell library.
- If you want to write tests in emulator traces, you still need Plutus-Apps and understand the "contract monad". But there are alternatives, like Plutus simple model developed by MLabs.
- Plutus simple model is also a Haskell library and is the one used in this course (PPP fourth cohort). It doesn't use the contract monad and is easier to use than emulator traces. A forthcoming lecture on testing will use "Plutus simple model" (as do the tests in the homeworks).
- Admittedly emulator traces are still quite nice, but it is unfortunate that you need all the theory behind the contract monad (and for this reason they will not be covered in this course).