Cardano Plutus Smart Contract Tutorial #2 | Endpoints and Validator Script Blockchain Development

preview_player
Показать описание
Update:
The comments have pointed out that the Starter project actually doesn't receive inputs correctly... oops! Follow Nikola Paunović solution in the comments below to get the inputs working properly for you!

In the second video of the series we're taking look at the Starter project on the Plutus Playground which is a starter script to create a smart contract.

We will be taking a deep dive into multiple concepts needed to create a plutus smart contract:
1) Validator Scripts with Datum and Redeemers to send transactions across the network
2) Getting user inputs with Schema with Endpoints
3) Transpiling code into Plutus Core to be used on the blockchain.

And as always we'll be doing light introduction on some of the Haskell syntax that shows up in the project.

At the end of the video, you should be a more confident blockchain developer being able to understand how other Plutus scripts work

🚀 Code from the video:

00:00 - Intro
00:55 - Starter project introduction
05:12 - Validator Scripts
07:18 - Datum/Redeemer Types
09:32 - Finding Data in the source code
11:06 - Plutus Core vs Plutux Tx
12:41 - Template Haskell: Creating Plutus Core code for the blockchain
15:20 - Getting/Retrieving user inputs from Endpoints
18:05 - Walking through the starter project
26:40 - Implementing our validator script
29:18 - Conclusion

Donate Ada: addr1qxws6z9qxkycclpxxpnkq202wxrlc7ke29zmpydj40a2z8aq4jx95m2pnvdrwrsrl5m30j0vce0w7k5zt0aeqzcsurwqulm5hc
Рекомендации по теме
Комментарии
Автор

Hey guys, first of all, thank you for taking the time to do this, it's been really helpful.

I have one question, though - is there something wrong with the Plutus code from the example or is it a bug in the Plutus playground? It looks like user input for lovelace amount is completely ignored. You can actually notice it in the first part of the video where you change the value to 25 and the log on the failing script still shows 20. At the end of the video where everything seemingly works alright you didn't change the value, so it wasn't noticeable, but I did it myself and something seems off.

nikolapaunovic
Автор

Finally some Cardano dev tutorials!!! Thank you!

gtgs
Автор

Great explanation 👍 thank you so much.

FacingBlocks
Автор

Congratulations for plowing through and understanding all this! Thanks for sharing.

jeffculbert
Автор

Absolute gold here man. Thanks for this.

VoxBlox
Автор

Thanks I'm half way through but its making sense. Thanks!!!

fuu
Автор

Hi! Thanks for the detailed information. I'm trying to make a smart contract game for my website, this will help A LOT!

nanoenzagaray
Автор

Please do a Part 3 explaining better the storage of state further than just a single parameter and external calls, can I call an API from the internet, or how do I call another contract.

jozepsul
Автор

makeLift: Given a custom type, it allow us to make use of that type in its on-chain side representation. Before attempting to use a user-defined type in our ValidatorScript we need to call this function or otherwise we can’t access that type definition from the on-chain side.

ferdikurt
Автор

Great video, I love learning new types of programming languages, and Plutus is completely new for me.
Seems like a very logical syntax.
Did you figure it out on your own? Of have you actually worked on it?

petsandpaws
Автор

Is that rice or soil in the corner?

Really amazing vid, thank you

kevinhock
Автор

Are there anything in Plutus look like Class, Inheritance, ... in OOP?

TheGodWarrior
Автор

nice! any plans on creating a discord group for people who are digging into plutus?

BobMarley-spzm
Автор

Would you say that Plutus lives up to Charles' promise of being the island where everything just works perfectly?

kmk
Автор

Thanks for the video, it’s really helpful.
Do you know if it would be possible to execute the endpoints from a custom ui or a program different than plutus playground?
I wonder how my end users will interact with the smart contract if is not possible

santypk
Автор

1:43 What are the "$$" and @" operators? Is the "@" an "as pattern"?

MajikSo
Автор

It's quite complex. I am a software developer but it's my first time using haskell which I learn for 2 weeks now. But to understand the basic plutus concepts, where should I start? I need to learn the fundamentals of a smart contract in plutus first.

UTxO_pHiLL