user934: This is part of my attempt at solving the first homework assignment of week 5 in the plutus pioneer program.
The rest of the unmodified file can be found here.
{-# INLINABLE mkPolicy #-}
-- This policy should only allow minting (or burning) of tokens if the owner of the specified PubKeyHash
-- has signed the transaction and if the specified deadline has not passed.
mkPolicy :: PubKeyHash -> Slot -> ScriptContext -> Bool
mkPolicy pkh deadline ctx = traceIfFalse "Valid signature missing" signed &&
                            traceIfFalse "Deadline has passed" stillTime
  where
    info :: TxInfo
    info = scriptContextTxInfo ctx

    signed :: Bool
    signed = txSignedBy info pkh

    stillTime :: Bool
    stillTime = to deadline `contains` txInfoValidRange info

policy :: PubKeyHash -> Slot -> Scripts.MonetaryPolicy
policy pkh deadline = mkMonetaryPolicyScript $
    $$(PlutusTx.compile [|| \pkh' deadline' -> Scripts.wrapMonetaryPolicy $ mkPolicy pkh' deadline' ||])
    `PlutusTx.applyCode`
    PlutusTx.liftCode pkh
    `PlutusTx.applyCode`
    PlutusTx.liftCode deadline

curSymbol :: PubKeyHash -> Slot -> CurrencySymbol
curSymbol pkh deadline = scriptCurrencySymbol $ policy pkh deadline

I tested the code by loading the file into the repl and running the test. The output confirms that this seems to be the right solution.
However, when compiling the code in the playground, I get this message:
It looks like you have not made any functions available, use `$(mkFunctions ['functionA, 'functionB])` to be able to use `functionA` and `functionB`

Since endpoints is defined, the contract is made available in the simulator and I can confirm the test manually in the simulator as well.
I am just very confused by this message. Did my code introduce an uncaptured error? I compiled some of the previous files without this message. What am I missing?

user186: The Playground needs some boilerplate added to a module:
mkSchemaDefinitions ''NAMEOFYOURSCHEMA
mkKnownCurrencies []


934: <p>This is part of my attempt at solving the first homework assignment of week 5 in the plutus pioneer program.
The rest of the unmodified file can be found <a href="https://raw.githubusercontent.com/input-output-hk/plutus-pioneer-program/main/code/week05/src/Week05/Homework1.hs" rel="noreferrer">here</a>.</p>
<pre><code>{-# INLINABLE mkPolicy #-}
-- This policy should only allow minting (or burning) of tokens if the owner of the specified PubKeyHash
-- has signed the transaction and if the specified deadline has not passed.
mkPolicy :: PubKeyHash -&gt; Slot -&gt; ScriptContext -&gt; Bool
mkPolicy pkh deadline ctx = traceIfFalse &quot;Valid signature missing&quot; signed &amp;&amp;
                            traceIfFalse &quot;Deadline has passed&quot; stillTime
  where
    info :: TxInfo
    info = scriptContextTxInfo ctx

    signed :: Bool
    signed = txSignedBy info pkh

    stillTime :: Bool
    stillTime = to deadline `contains` txInfoValidRange info

policy :: PubKeyHash -&gt; Slot -&gt; Scripts.MonetaryPolicy
policy pkh deadline = mkMonetaryPolicyScript $
    $$(PlutusTx.compile [|| \pkh' deadline' -&gt; Scripts.wrapMonetaryPolicy $ mkPolicy pkh' deadline' ||])
    `PlutusTx.applyCode`
    PlutusTx.liftCode pkh
    `PlutusTx.applyCode`
    PlutusTx.liftCode deadline

curSymbol :: PubKeyHash -&gt; Slot -&gt; CurrencySymbol
curSymbol pkh deadline = scriptCurrencySymbol $ policy pkh deadline
</code></pre>
<p>I tested the code by loading the file into the repl and running the test. The output confirms that this seems to be the right solution.</p>
<p>However, when compiling the code in the playground, I get this message:</p>
<pre><code>It looks like you have not made any functions available, use `$(mkFunctions ['functionA, 'functionB])` to be able to use `functionA` and `functionB`
</code></pre>
<p>Since <code>endpoints</code> is defined, the contract is made available in the simulator and I can confirm the test manually in the simulator as well.</p>
<p>I am just very confused by this message. Did my code introduce an uncaptured error? I compiled some of the previous files without this message. What am I missing?</p>
 186: <p>The Playground needs some boilerplate added to a module:</p>
<pre><code>mkSchemaDefinitions ''NAMEOFYOURSCHEMA
mkKnownCurrencies []
</code></pre>
