<p>It is because endpoint has changed according to:
<a href="https://youtu.be/zW3D2iM5uVg?t=1218" rel="nofollow noreferrer">https://youtu.be/zW3D2iM5uVg?t=1218</a></p>
<p>You need to use an older version of Plutus Playground which comes together with plutus commit which was in lecture 5. You will need to start it locally.</p>
<p>So in general you will need to do checkout <a href="https://github.com/input-output-hk/plutus" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus</a> at the same commit which is <a href="https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week05/cabal.project#L28" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week05/cabal.project#L28</a> but this commit is not present anymore so you can use this instead <code>a5e7a257706c7f5fdab17dbd16683c2390c3ab95</code> and to start plutus-playground server and client like it is described in Readme for Week1 <a href="https://github.com/input-output-hk/plutus-pioneer-program" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-pioneer-program</a></p>
<p>or you can try to change</p>
<pre><code>endpoints = mint' &gt;&gt; endpoints
  where
    mint' = endpoint @&quot;mint&quot; &gt;&gt;= mint
</code></pre>
<p>to:</p>
<pre><code>endpoints = forever
          $ handleError logError
          $ awaitPromise
          $ endpoint @&quot;mint&quot; $ mint
</code></pre>

CC BY-SA 4.0
2021-11-27T16:43:21.660Z
2021-11-27T18:24:40.103Z
2021-11-27T18:24:40.103Z
zarej
<p>Im trying to run Week05's home work solution 1 on the online plutus playground enviornment but I keep getting errors in lines 79 to 84 dose anybody know how to fix this?</p>
<p>code pasted below along with errors</p>
<pre><code>endpoints :: Contract () SignedSchema Text ()
endpoints = mint' &gt;&gt; endpoints
  where
    mint' = endpoint @&quot;mint&quot; &gt;&gt;= mint
</code></pre>
<p>errors</p>
<pre><code>Compilation Error, Line 80, Column 13 (jump)

 error:
    * Couldn't match type `(-&gt;) (a0 -&gt; Contract w0 s0 e0 b0)'
                     with `Contract () SignedSchema Text'
      Expected type: Contract () SignedSchema Text ()
        Actual type: (a0 -&gt; Contract w0 s0 e0 b0) -&gt; ()
    * Probable cause: `(&gt;&gt;)' is applied to too few arguments
      In the expression: mint' &gt;&gt; endpoints
      In an equation for `endpoints':
          endpoints
            = mint' &gt;&gt; endpoints
            where
                mint' = endpoint @&quot;mint&quot; &gt;&gt;= mint
   |
80 | endpoints = mint' &gt;&gt; endpoints
   |             ^^^^^^^^^^^^^^^^^^

Compilation Error, Line 80, Column 22 (jump)

 error:
    * Couldn't match type `Contract () SignedSchema Text'
                     with `(-&gt;) (a0 -&gt; Contract w0 s0 e0 b0)'
      Expected type: (a0 -&gt; Contract w0 s0 e0 b0) -&gt; ()
        Actual type: Contract () SignedSchema Text ()
    * In the second argument of `(&gt;&gt;)', namely `endpoints'
      In the expression: mint' &gt;&gt; endpoints
      In an equation for `endpoints':
          endpoints
            = mint' &gt;&gt; endpoints
            where
                mint' = endpoint @&quot;mint&quot; &gt;&gt;= mint
   |
80 | endpoints = mint' &gt;&gt; endpoints
   |                      ^^^^^^^^^

Compilation Error, Line 82, Column 13 (jump)

 error:
    * Couldn't match type `Promise w s e b' with `MintParams'
      Expected type: (a -&gt; Contract w s e b) -&gt; MintParams
        Actual type: (a -&gt; Contract w s e b) -&gt; Promise w s e b
    * In the first argument of `(&gt;&gt;=)', namely `endpoint @&quot;mint&quot;'
      In the expression: endpoint @&quot;mint&quot; &gt;&gt;= mint
      In an equation for mint': mint' = endpoint @&quot;mint&quot; &gt;&gt;= mint
    * Relevant bindings include
        mint' :: (a -&gt; Contract w s e b) -&gt; ()
          (bound at /tmp/web-ghc-work-5bba159ebc709aaf/Main.hs:82:5)
   |
82 |     mint' = endpoint @&quot;mint&quot; &gt;&gt;= mint
   |             ^^^^^^^^^^^^^^^^

Compilation Error, Line 82, Column 34 (jump)

 error:
    * Couldn't match type `Contract w1 SignedSchema Text'
                     with `(-&gt;) (a -&gt; Contract w s e b)'
      Expected type: MintParams -&gt; (a -&gt; Contract w s e b) -&gt; ()
        Actual type: MintParams -&gt; Contract w1 SignedSchema Text ()
    * In the second argument of `(&gt;&gt;=)', namely `mint'
      In the expression: endpoint @&quot;mint&quot; &gt;&gt;= mint
      In an equation for mint': mint' = endpoint @&quot;mint&quot; &gt;&gt;= mint
    * Relevant bindings include
        mint' :: (a -&gt; Contract w s e b) -&gt; ()
          (bound at /tmp/web-ghc-work-5bba159ebc709aaf/Main.hs:82:5)
   |
82 |     mint' = endpoint @&quot;mint&quot; &gt;&gt;= mint
   |   

                           ^^^^
</code></pre>

<plutus-pioneer-program><plutus-playground>
I'm getting errors in Week05 Solution.hs
# I'm getting errors in Week05 Solution.hs

(Asked by: username_0 on 2021-11-27)

Im trying to run Week05's home work solution 1 on the online plutus playground enviornment but I keep getting errors in lines 79 to 84 dose anybody know how to fix this?
code pasted below along with errors
endpoints :: Contract () SignedSchema Text ()
endpoints = mint' >> endpoints
  where
    mint' = endpoint @"mint" >>= mint

errors
Compilation Error, Line 80, Column 13 (jump)

 error:
    * Couldn't match type `(->) (a0 -> Contract w0 s0 e0 b0)'
                     with `Contract () SignedSchema Text'
      Expected type: Contract () SignedSchema Text ()
        Actual type: (a0 -> Contract w0 s0 e0 b0) -> ()
    * Probable cause: `(>>)' is applied to too few arguments
      In the expression: mint' >> endpoints
      In an equation for `endpoints':
          endpoints
            = mint' >> endpoints
            where
                mint' = endpoint @"mint" >>= mint
   |
80 | endpoints = mint' >> endpoints
   |             ^^^^^^^^^^^^^^^^^^

Compilation Error, Line 80, Column 22 (jump)

 error:
    * Couldn't match type `Contract () SignedSchema Text'
                     with `(->) (a0 -> Contract w0 s0 e0 b0)'
      Expected type: (a0 -> Contract w0 s0 e0 b0) -> ()
        Actual type: Contract () SignedSchema Text ()
    * In the second argument of `(>>)', namely `endpoints'
      In the expression: mint' >> endpoints
      In an equation for `endpoints':
          endpoints
            = mint' >> endpoints
            where
                mint' = endpoint @"mint" >>= mint
   |
80 | endpoints = mint' >> endpoints
   |                      ^^^^^^^^^

Compilation Error, Line 82, Column 13 (jump)

 error:
    * Couldn't match type `Promise w s e b' with `MintParams'
      Expected type: (a -> Contract w s e b) -> MintParams
        Actual type: (a -> Contract w s e b) -> Promise w s e b
    * In the first argument of `(>>=)', namely `endpoint @"mint"'
      In the expression: endpoint @"mint" >>= mint
      In an equation for mint': mint' = endpoint @"mint" >>= mint
    * Relevant bindings include
        mint' :: (a -> Contract w s e b) -> ()
          (bound at /tmp/web-ghc-work-5bba159ebc709aaf/Main.hs:82:5)
   |
82 |     mint' = endpoint @"mint" >>= mint
   |             ^^^^^^^^^^^^^^^^

Compilation Error, Line 82, Column 34 (jump)

 error:
    * Couldn't match type `Contract w1 SignedSchema Text'
                     with `(->) (a -> Contract w s e b)'
      Expected type: MintParams -> (a -> Contract w s e b) -> ()
        Actual type: MintParams -> Contract w1 SignedSchema Text ()
    * In the second argument of `(>>=)', namely `mint'
      In the expression: endpoint @"mint" >>= mint
      In an equation for mint': mint' = endpoint @"mint" >>= mint
    * Relevant bindings include
        mint' :: (a -> Contract w s e b) -> ()
          (bound at /tmp/web-ghc-work-5bba159ebc709aaf/Main.hs:82:5)
   |
82 |     mint' = endpoint @"mint" >>= mint
   |   

                           ^^^^

**Tags:** plutus-pioneer-program, plutus-playground

---

## 1 answers

### Answer by username_1 on 2021-11-27. Score: 0

It is because endpoint has changed according to:
https://youtu.be/zW3D2iM5uVg?t=1218
You need to use an older version of Plutus Playground which comes together with plutus commit which was in lecture 5. You will need to start it locally.
So in general you will need to do checkout https://github.com/input-output-hk/plutus at the same commit which is https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week05/cabal.project#L28 but this commit is not present anymore so you can use this instead a5e7a257706c7f5fdab17dbd16683c2390c3ab95 and to start plutus-playground server and client like it is described in Readme for Week1 https://github.com/input-output-hk/plutus-pioneer-program
or you can try to change
endpoints = mint' >> endpoints
  where
    mint' = endpoint @"mint" >>= mint

to:
endpoints = forever
          $ handleError logError
          $ awaitPromise
          $ endpoint @"mint" $ mint


---

