Writing a basic app in Plutus tutorial

Hi,

Still wrestling with the basic app in Plutus tutorial at

https://playground.plutus.iohkdev.io/tutorial/tutorials/basic-apps.html

As you can see in the screenshot below, the tutorial appears to give the type signature of endpoints instead of its definition (the type signature line of code appears twice, and there is no definition of ‘endpoints’ shown). I assume this is a mistake (it certainly doesn’t compile as is).

Anybody know what the definition should be here? I’ve made a few guesses but haven’t managed to compile.

Thanks!

Based on the text I’m guessing I want to use a select function over lock and unlock, so for now I will try to track down some example of how select would be used here.

This is solved. I found another mirror of the tutorial here

https://alpha.marlowe.iohkdev.io/doc/plutus/tutorials/basic-apps.html

Which included the correct line.

endpoints = (lock >>= lockFunds . mkSplitData) select (unlock >>= unlockFunds . mkSplitData)

2 Likes

Thanks for taking the time to post the solution here. I’m sure this will help someone in the future.

1 Like