user2511: I upgraded the Plutus version used by my project to: 2f11c28bd8f6d630daab582255e16d8408075bd7
PS: It is the same version Lars used in his latest lecture (Iteration #2 - Lecture #8)
Here is the code I'm using to define the endpoints:
data StarterContracts =
    MarketContract
    deriving (Eq, Ord, Show, Generic, FromJSON, ToJSON)

instance Pretty StarterContracts where
    pretty = viaShow

handleStarterContract ::
    ( Member (Error PABError) effs
    , Member (LogMsg (PABMultiAgentMsg (Builtin StarterContracts))) effs
    )
    => ContractEffect (Builtin StarterContracts)
    ~> Eff effs
handleStarterContract = handleBuiltin getSchema getContract where
    getSchema = \case
        MarketContract -> endpointsToSchemas @Market.MarketSchema
    getContract = \case
        MarketContract -> SomeBuiltin Market.endpoints

handlers :: SimulatorEffectHandlers (Builtin StarterContracts)
handlers =
    Simulator.mkSimulatorHandlers @(Builtin StarterContracts) [MarketContract]
    $ interpret handleStarterContract

And this is the error I'm getting when trying to compile it:
app/Main.hs:62:25: error:
    • Couldn't match expected type ‘(StarterContracts
                                     -> [playground-common-0.1.0.0:Playground.Types.FunctionSchema
                                           playground-common-0.1.0.0:Schema.FormSchema])
                                    -> (StarterContracts -> SomeBuiltin)
                                    -> ContractEffect (Builtin StarterContracts) x
                                    -> Eff effs x’
                  with actual type ‘Plutus.PAB.Effects.Contract.Builtin.BuiltinHandler
                                      a0’
    • The function ‘handleBuiltin’ is applied to two arguments,
      but its type ‘Plutus.PAB.Effects.Contract.Builtin.BuiltinHandler
                      a0’
      has none
      In the expression: handleBuiltin getSchema getContract
      In an equation for ‘handleStarterContract’:
          handleStarterContract
            = handleBuiltin getSchema getContract
            where
                getSchema
                  = \case MarketContract -> endpointsToSchemas @MarketSchema
                getContract = \case MarketContract -> SomeBuiltin endpoints
    • Relevant bindings include
        handleStarterContract :: ContractEffect (Builtin StarterContracts)
                                 ~> Eff effs
          (bound at app/Main.hs:62:1)
   |
62 | handleStarterContract = handleBuiltin getSchema getContract where
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

app/Main.hs:70:5: error:
    • Couldn't match type ‘Simulator.SimulatorContractHandler
                             (Builtin StarterContracts)
                           -> SimulatorEffectHandlers (Builtin StarterContracts)’
                     with ‘Plutus.PAB.Core.EffectHandlers
                             (Builtin StarterContracts)
                             (Simulator.SimulatorState (Builtin StarterContracts))’
      Expected type: SimulatorEffectHandlers (Builtin StarterContracts)
        Actual type: Simulator.SimulatorContractHandler
                       (Builtin StarterContracts)
                     -> SimulatorEffectHandlers (Builtin StarterContracts)
    • In the expression:
        Simulator.mkSimulatorHandlers
          @(Builtin StarterContracts) [MarketContract]
          $ interpret handleStarterContract
      In an equation for ‘handlers’:
          handlers
            = Simulator.mkSimulatorHandlers
                @(Builtin StarterContracts) [MarketContract]
                $ interpret handleStarterContract
   |
70 |     Simulator.mkSimulatorHandlers @(Builtin StarterContracts) [MarketContract]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

app/Main.hs:70:63: error:
    • Couldn't match expected type ‘Ledger.Fee.FeeConfig’
                  with actual type ‘[StarterContracts]’
    • In the second argument of ‘Simulator.mkSimulatorHandlers’, namely
        ‘[MarketContract]’
      In the expression:
        Simulator.mkSimulatorHandlers
          @(Builtin StarterContracts) [MarketContract]
      In the expression:
        Simulator.mkSimulatorHandlers
          @(Builtin StarterContracts) [MarketContract]
          $ interpret handleStarterContract
   |
70 |     Simulator.mkSimulatorHandlers @(Builtin StarterContracts) [MarketContract]
   |                                                               ^^^^^^^^^^^^^^^^

app/Main.hs:71:7: error:
    • Couldn't match expected type ‘Ledger.TimeSlot.SlotConfig’
                  with actual type ‘Eff
                                      (ContractEffect (Builtin StarterContracts) : effs0) x0
                                    -> Eff effs0 x0’
    • Probable cause: ‘interpret’ is applied to too few arguments
      In the second argument of ‘($)’, namely
        ‘interpret handleStarterContract’
      In the expression:
        Simulator.mkSimulatorHandlers
          @(Builtin StarterContracts) [MarketContract]
          $ interpret handleStarterContract
      In an equation for ‘handlers’:
          handlers
            = Simulator.mkSimulatorHandlers
                @(Builtin StarterContracts) [MarketContract]
                $ interpret handleStarterContract
   |
71 |     $ interpret handleStarterContract
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


user2681: Plutus is still in active development, so changes in the API can occur every week.
For your case, go look at a similar example in the PAB.
In your specific case, you'll need to change your handlers function to :
handlers :: SimulatorEffectHandlers (Builtin StarterContracts)
handlers =
    Simulator.mkSimulatorHandlers def def 
    $ interpret (contractHandler Builtin.handleBuiltin)

Then you'll need to implement the HasDefinitions and the HasPSTypes typeclasses for your StarterContracts. For the HasPSTypes, you can just use the default implementation which is:
instance HasPSTypes StarterContracts where
    psTypes _ = []

Hope that helps.

2511: <p>I upgraded the Plutus version used by my project to: <code>2f11c28bd8f6d630daab582255e16d8408075bd7</code></p>
<p>PS: It is the same version Lars used in his latest lecture (<a href="https://www.youtube.com/watch?v=zW3D2iM5uVg" rel="noreferrer">Iteration #2 - Lecture #8</a>)</p>
<p>Here is the <strong>code</strong> I'm using to define the endpoints:</p>
<pre><code>data StarterContracts =
    MarketContract
    deriving (Eq, Ord, Show, Generic, FromJSON, ToJSON)

instance Pretty StarterContracts where
    pretty = viaShow

handleStarterContract ::
    ( Member (Error PABError) effs
    , Member (LogMsg (PABMultiAgentMsg (Builtin StarterContracts))) effs
    )
    =&gt; ContractEffect (Builtin StarterContracts)
    ~&gt; Eff effs
handleStarterContract = handleBuiltin getSchema getContract where
    getSchema = \case
        MarketContract -&gt; endpointsToSchemas @Market.MarketSchema
    getContract = \case
        MarketContract -&gt; SomeBuiltin Market.endpoints

handlers :: SimulatorEffectHandlers (Builtin StarterContracts)
handlers =
    Simulator.mkSimulatorHandlers @(Builtin StarterContracts) [MarketContract]
    $ interpret handleStarterContract
</code></pre>
<p>And this is the <strong>error</strong> I'm getting when trying to compile it:</p>
<pre><code>app/Main.hs:62:25: error:
    • Couldn't match expected type ‘(StarterContracts
                                     -&gt; [playground-common-0.1.0.0:Playground.Types.FunctionSchema
                                           playground-common-0.1.0.0:Schema.FormSchema])
                                    -&gt; (StarterContracts -&gt; SomeBuiltin)
                                    -&gt; ContractEffect (Builtin StarterContracts) x
                                    -&gt; Eff effs x’
                  with actual type ‘Plutus.PAB.Effects.Contract.Builtin.BuiltinHandler
                                      a0’
    • The function ‘handleBuiltin’ is applied to two arguments,
      but its type ‘Plutus.PAB.Effects.Contract.Builtin.BuiltinHandler
                      a0’
      has none
      In the expression: handleBuiltin getSchema getContract
      In an equation for ‘handleStarterContract’:
          handleStarterContract
            = handleBuiltin getSchema getContract
            where
                getSchema
                  = \case MarketContract -&gt; endpointsToSchemas @MarketSchema
                getContract = \case MarketContract -&gt; SomeBuiltin endpoints
    • Relevant bindings include
        handleStarterContract :: ContractEffect (Builtin StarterContracts)
                                 ~&gt; Eff effs
          (bound at app/Main.hs:62:1)
   |
62 | handleStarterContract = handleBuiltin getSchema getContract where
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

app/Main.hs:70:5: error:
    • Couldn't match type ‘Simulator.SimulatorContractHandler
                             (Builtin StarterContracts)
                           -&gt; SimulatorEffectHandlers (Builtin StarterContracts)’
                     with ‘Plutus.PAB.Core.EffectHandlers
                             (Builtin StarterContracts)
                             (Simulator.SimulatorState (Builtin StarterContracts))’
      Expected type: SimulatorEffectHandlers (Builtin StarterContracts)
        Actual type: Simulator.SimulatorContractHandler
                       (Builtin StarterContracts)
                     -&gt; SimulatorEffectHandlers (Builtin StarterContracts)
    • In the expression:
        Simulator.mkSimulatorHandlers
          @(Builtin StarterContracts) [MarketContract]
          $ interpret handleStarterContract
      In an equation for ‘handlers’:
          handlers
            = Simulator.mkSimulatorHandlers
                @(Builtin StarterContracts) [MarketContract]
                $ interpret handleStarterContract
   |
70 |     Simulator.mkSimulatorHandlers @(Builtin StarterContracts) [MarketContract]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

app/Main.hs:70:63: error:
    • Couldn't match expected type ‘Ledger.Fee.FeeConfig’
                  with actual type ‘[StarterContracts]’
    • In the second argument of ‘Simulator.mkSimulatorHandlers’, namely
        ‘[MarketContract]’
      In the expression:
        Simulator.mkSimulatorHandlers
          @(Builtin StarterContracts) [MarketContract]
      In the expression:
        Simulator.mkSimulatorHandlers
          @(Builtin StarterContracts) [MarketContract]
          $ interpret handleStarterContract
   |
70 |     Simulator.mkSimulatorHandlers @(Builtin StarterContracts) [MarketContract]
   |                                                               ^^^^^^^^^^^^^^^^

app/Main.hs:71:7: error:
    • Couldn't match expected type ‘Ledger.TimeSlot.SlotConfig’
                  with actual type ‘Eff
                                      (ContractEffect (Builtin StarterContracts) : effs0) x0
                                    -&gt; Eff effs0 x0’
    • Probable cause: ‘interpret’ is applied to too few arguments
      In the second argument of ‘($)’, namely
        ‘interpret handleStarterContract’
      In the expression:
        Simulator.mkSimulatorHandlers
          @(Builtin StarterContracts) [MarketContract]
          $ interpret handleStarterContract
      In an equation for ‘handlers’:
          handlers
            = Simulator.mkSimulatorHandlers
                @(Builtin StarterContracts) [MarketContract]
                $ interpret handleStarterContract
   |
71 |     $ interpret handleStarterContract
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
</code></pre>
 2681: <p><code>Plutus</code> is still in active development, so changes in the API can occur every week.</p>
<p>For your case, go look at <a href="https://github.com/input-output-hk/plutus/blob/2f11c28bd8f6d630daab582255e16d8408075bd7/plutus-pab/examples/ContractExample.hs" rel="nofollow noreferrer">a similar example in the PAB</a>.</p>
<p>In your specific case, you'll need to change your <code>handlers</code> function to :</p>
<pre><code>handlers :: SimulatorEffectHandlers (Builtin StarterContracts)
handlers =
    Simulator.mkSimulatorHandlers def def 
    $ interpret (contractHandler Builtin.handleBuiltin)
</code></pre>
<p>Then you'll need to implement the <code>HasDefinitions</code> and the <code>HasPSTypes</code> typeclasses for your <code>StarterContracts</code>. For the <code>HasPSTypes</code>, you can just use the default implementation which is:</p>
<pre><code>instance HasPSTypes StarterContracts where
    psTypes _ = []
</code></pre>
<p>Hope that helps.</p>
