Beginner Plutus Questions

I learned so much in my Beginner Marlowe Meadow Questions threads (special thanks to @bobert & @adatainment), that I thought I should do the same for Plutus now that I am spending all my time there. Maybe it will be helpful to other beginners also.

As a raw beginner, I’ve made huge learning progress in Plutus by going over the Jelly Bean Guessing Game and Naive Lottery smart contract examples that @bobert put out: here and here. They were a little easier to dive into than the ones offered directly in Plutus Playground here.

I’m also finding that I make big breakthroughs in understanding the @bobert sample SCs as I continue noobishly learning more Haskell generally from resources like these: Learn You a Haskell and Learn Haskell in One Youtube Video.

One additional puzzle piece has been understanding the Plutus stuff I can find in the IOHK github like this:

https://github.com/input-output-hk/plutus/blob/master/wallet-api/tutorial/Tutorial.md, and
https://github.com/input-output-hk/plutus/blob/master/plutus-tx/src/Language/PlutusTx/Prelude.hs.

Now for a question. As far as those types of github files above, is there a good one to look at to understand the PlutusTx Builtins?

I found figure 13 in this Formal Specification Paper by Rebecca Valentine that covers Builtins. But I’m thinking there might be something more easily consumable in the github?

6 Likes

From what I understand the Builtins aren’t really supposed to be used by the end-user but are meant to be added to the PlutusTx Prelude (which is what a PR request I made got accepted for on the Plutus repo, to add the rest of the ByteString Builtins to the Prelude) so that there is a single unified interface. There isn’t any documentation on the Prelude as of yet (it still needs lots of work anyways), but you can read the source to see what is available and then google the haskell equivalent functions to figure out what is going on: https://github.com/input-output-hk/plutus/blob/master/plutus-tx/src/Language/PlutusTx/Prelude.hs

Otherwise in the near future (span of a couple weeks) I will be releasing a lot more educational Plutus content so stay tuned :ok_hand:

7 Likes

@bobert Massive thanks for the info on the Builtins. I’ll work through the Prelude and the Haskell equivalent functions.

Will look forward to what you put out next.

2 Likes

Yesterday, I posted an idea for a DApp in the DApp idea thread. It would be a Simple Resource Allocation Voting Contract that would allow for this:

  1. funds are locked in the SC,
  2. users offer various options,
  3. users vote on the various options,
  4. votes are tallied, and
  5. funds go to the address that offered the winning option.

It’s not really something I would particularly want to use, or even see in use necessarily…I still remember the DAO recursive call attack. But, I thought it would be a good way to better understand voting mechanics.

Instead of waiting for someone to show me how to do it, I thought I would just take a stab at it as a learning project.

Obviously, I’m a raw beginner at coding and this thing is riddled with conceptual and technical mistakes. But, if anyone wants to take a peek at it and give me some pointers, that would be awesome:

2 Likes

Howdy!

Looking to learn some Plutus. Checked out the eBook, started the Udemy course etc… All sources warn that the content is out of date and to use caution. With that in mind, should I hold off learning until the next revision comes out or will it be small changes that won’t affect the majority of what I would learn if I take the time to go through all the training now? If it is recommended to wait a bit, any thoughts or guesses as to an approximate timeline before updated materials become available? If there does happen to be an up to date resource available that I just haven’t found yet please do point me in that direction. Much appreciated!

Thanks!

Hi Mark. Probably best to wait for a bit. There will be a bit more information about timelines at the Cardano Virtual Summit.

1 Like