user1108: I have the following datum type
data ProjectSubmitDatum = ProjectSubmitDatum
  { vProjectOwner :: PaymentPubKeyHash,
    vProjectRegistrationFee :: Integer,
    vProjectCategory :: BuiltinByteString,
    vFundPayIdentifier :: PaymentPubKeyHash
  }
  deriving (Show)

I also have the module imported like this
import Ledger.Address 

The following error pops up when i run cabal repl
src/QuadraticVFSC.hs:45:19: error:
    Not in scope: type constructor or class ‘PaymentPubKeyHash’
   |
45 |   { vFundOwner :: PaymentPubKeyHash,
   |                   ^^^^^^^^^^^^^^^^^


user2537: you need to import either the whole module like this:
import Ledger

or the specific type like this:
import Ledger (PaymentPubKeyHash)


user1118: You neeed to import PaymentPubKeyHash it like the following:
import Ledger.Address qualified as Address                      (Address, PaymentPubKeyHash(..))
This works for me and you can checkout my working code on testnet here:
https://github.com/lley154/cardano-lottery/blob/main/src/OnChain.hs
Cheers,
Lawrence

1108: <p>I have the following datum type</p>
<pre><code>data ProjectSubmitDatum = ProjectSubmitDatum
  { vProjectOwner :: PaymentPubKeyHash,
    vProjectRegistrationFee :: Integer,
    vProjectCategory :: BuiltinByteString,
    vFundPayIdentifier :: PaymentPubKeyHash
  }
  deriving (Show)
</code></pre>
<p>I also have the module imported like this</p>
<pre><code>import Ledger.Address 
</code></pre>
<p>The following error pops up when i run cabal repl</p>
<pre><code>src/QuadraticVFSC.hs:45:19: error:
    Not in scope: type constructor or class ‘PaymentPubKeyHash’
   |
45 |   { vFundOwner :: PaymentPubKeyHash,
   |                   ^^^^^^^^^^^^^^^^^
</code></pre>
 2537: <p>you need to import either the whole module like this:</p>
<pre><code>import Ledger
</code></pre>
<p>or the specific type like this:</p>
<pre><code>import Ledger (PaymentPubKeyHash)
</code></pre>
 1118: <p>You neeed to import PaymentPubKeyHash it like the following:</p>
<p><code>import Ledger.Address qualified as Address                      (Address, PaymentPubKeyHash(..))</code></p>
<p>This works for me and you can checkout my working code on testnet here:</p>
<p><a href="https://github.com/lley154/cardano-lottery/blob/main/src/OnChain.hs" rel="nofollow noreferrer">https://github.com/lley154/cardano-lottery/blob/main/src/OnChain.hs</a></p>
<p>Cheers,</p>
<p>Lawrence</p>
