Skip to content

This is a fork of the IOHK Plutus Pioneer Program repository. I am adding READMEs to each of the lectures to transcribe the audio.

Notifications You must be signed in to change notification settings

purplepwny/plutus-pioneer-program

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plutus Pioneer Program

This is my fork of the Plutus Pioneer Program where I will keep the examples up-to-date with the latest Plutus main branch.

I also use this to add comments to the code.

Lectures

  • Lecture #1

    • Welcome
    • The (E)UTxO-model
    • Running an example auction contract on a local Playground
    • Homework
  • Lecture #2

    • Triggering change.
    • Low-level, untyped on-chain validation scripts.
    • High-level, typed on-chain validation scripts.
  • Lecture #3

    • Script context.
    • Time handling.
    • Parameterized contracts.
  • Lecture #4

    • Monads
    • The EmulatorTrace monad.
    • The Contract monad.
  • Lecture #5

    • Values.
    • Native tokens & minting policies.
    • NFT's.
  • Lecture #6

    • Oracles.
    • Using the PAB.
  • Lecture #7

    • Commit schemes.
    • State machines.
  • Lecture #8

    • Another state machine example: token sale.
    • Automatic testing using emulator traces.
    • Interlude: optics.
    • Property based testing with QuickCheck.
    • Testing Plutus contracts with property based testing.
  • Lecture #9

    • Marlowe overview (slides).
    • Marlowe in Plutus.
    • Marlowe Playground demo.
  • Lecture #10

    • Uniswap overview.
    • Uniswap implementation in Plutus.
    • Deploying Uniswap with the PAB.
    • Demo.
    • Using curl to interact with the PAB.

Code Examples

Exercises

  • Week #1

    • Build the English Auction contract with cabal build (you may need to run cabal update first).
    • Clone the The Plutus repository, check out the correct commit as specified in cabal.project.
    • Set-up IOHK binary caches How to set up the IOHK binary caches. "If you do not do this, you will end up building GHC, which takes several hours. If you find yourself building GHC, STOP and fix the cache."
    • Enter a nix-shell.
    • Go to the plutus-playground-client folder.
    • Start the Playground server with plutus-playground-server.
    • Start the Playground client (in another nix-shell) with npm run start.
    • Copy-paste the auction contract into the Playground editor - don't forget to remove the module header!
    • Compile.
    • Simulate various auction scenarios.
  • Week #2

    • Fix and complete the code in the Homework1 module.
    • Fix and complete the code in the Homework2 module.
  • Week #3

    • Fix and complete the code in the Homework1 module.
    • Fix and complete the code in the Homework2 module.
  • Week #4

    • Write an appropriate EmulatorTrace that uses the payContract contract in the Homework module.
    • Catch errors in the payContract contract in the same module.
  • Week #5

    • Add a deadline to the minting policy in the Homework1 module.
    • Fix the token name to the empty ByteString in the NFT contract in the Homework2 module.
  • Week #6

    • Get the Oracle demo running and extend it in some way.
  • Week #7

    • Implement the game of "Rock, Paper, Scissors" using state machines.
  • Week #8

    • Add a new operation close to the TokenSale-contract that allows the seller to close the contract and retrieve all remaining funds (including the NFT).
    • Modify the tests accordingly.
  • Week #9

    • Modify the example Marlowe contract, so that Charlie must put down twice the deposit in the very beginning, which gets split between Alice and Bob if Charlie refuses to make his choice.
  • Week #10

    • Get the Uniswap demo running and extend it in some way.

Solutions

Some Plutus Modules

Plutus community playground

Additional Resources

About

This is a fork of the IOHK Plutus Pioneer Program repository. I am adding READMEs to each of the lectures to transcribe the audio.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 93.3%
  • Haskell 4.6%
  • JavaScript 1.4%
  • Other 0.7%