Welcome the Plutus Explained series of blog posts in which I explain the Plutus programming language in an accessible manner. Today we will take a look at one page of the Plutus documentation and seek to get comfortable with everything that’s on there. Being able to navigate the documentation of any programing language is one of the top 2 skills you need to have for debugging your code (the first being able to google the answer).
The image above comes from here. The structure here is as follows:
- Module name and path (Plutus.v1.Ledger.Contexts)
- The name of the data type
- A short description
- Data constructors – these return a data value and may be simple data or functions that are executed that return a data value
- Instances – think of these as dependents. They implement the data type as an input
You click the source hyperlinks to see the source code for any of the above.
Also note that there can be other data types such as ScriptContext (shown) that have functions that generate a TxInfo as an output.