Plutus Development: Working with Time to Set Deadlines
In this video we will learn how to work with time to set deadlines and other time restricts in Plutus smart contracts. To do this we will learn about how Plutus represents time via an Interval and then we'll take a look at building another project. Discord: https://discord.gg/uVP7w8nZ Resources: Plutus Playground: https://playground.plutus.iohkdev.io/ Script: https://github.com/chang47/Practical-Plutus/blob/main/setting-timeline.hs ScriptContext: https://alpha.marlowe.iohkdev.io/doc/haddock/plutus-ledger-api/html/Plutus-V1-Ledger-Contexts.html Interval: https://alpha.marlowe.iohkdev.io/doc/haddock/plutus-ledger-api/html/Plutus-V1-Ledger-Interval.html#t:Interval 00:00 - Intro 00:28 - Working with Intervals 01:10 - Dive into how time is represented in the Script Context 03:18 - Dive into interval helper functions 05:09 - Deadline project intro 06:01 - On-chain code spec 06:24 - Off-chain code spec 06:53 - Implementing initial on-chain code 09:04 - Implementing initial off-chain code 12:19 - Setting up testing of smart contract 12:36 - Implementing time for off-chain code 18:12 - Implementing time for on-chain code 21:26 - Running the contract on the playground
Download
0 formatsNo download links available.