I'm trying to compile the week 1 code on plutus playground hosted locally, but I'm getting this error:

    Not in scope: type constructor or class ‘PaymentPubKeyHash’
57 |     { aSeller   :: !PaymentPubKeyHash


This is the code that originates the compilation error:

data Auction = Auction
    { aSeller   :: !PaymentPubKeyHash
    , aDeadline :: !POSIXTime
    , aMinBid   :: !Integer
    , aCurrency :: !CurrencySymbol
    , aToken    :: !TokenName
    } deriving (P.Show, Generic, ToJSON, FromJSON, ToSchema)

I have followed the steps on the week1 videos, but I'm getting this error, any help is welcomed. Thank you.

  • What gitrev of plutus-apps are you using? Can you gist your entire code file? I'm guessing either a version mismatch or a typo. Jan 17, 2022 at 2:12
  • 1
    @SamuelLeathers I just got it working. I ran cabal update in the week1 code folder and the code compiled. Thank you. Jan 17, 2022 at 2:22
  • Also, I was running the plutus playground on a old version of plutus repository not plutus-apps Jan 17, 2022 at 2:24

1 Answer 1


import Ledger.Address qualified as Address (Address, PaymentPubKeyHash(..))

import PaymentPubKeyHash .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.