<p>Turns out using the commit from Week06, <code>8a20664f00d8f396920385947903761a9a897fe0</code>, is the cleanest solution (too bad it wasn't merged at the time of asking this question): <a href="https://github.com/input-output-hk/plutus-pioneer-program/pull/36" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-pioneer-program/pull/36</a></p>
<p>This commit doesn't require any changes to the <code>endpoints</code> or updating any imports.</p>

CC BY-SA 4.0
2021-10-11T15:44:21.967Z
2021-10-11T15:44:21.967Z
Paymahn Moghadasian
<p>You should be aware that plutus is changing constantly, so some commits aren't working anymore.</p>
<p>In this case, you can use this commit hash: <code>547e22a975d9b688ad2121f56e63691bead661cc</code> (or this one <code>9ed85d6cc8e817270220f263a11e738135eb0ad3</code> as mentioned in following comment) but remember to update your <code>cabal.project</code> according to this, from Antonio Ibarra IOHK:</p>
<blockquote>
<p>when you update the Plutus Hash in the cabal.project file, you will also need to update the hash of all source repositories. To do that you can go to the cabal.project original repository in the defined commit (in this case <a href="https://github.com/input-output-hk/plutus/blob/9ed85d6cc8e817270220f263a11e738135eb0ad3/cabal.project" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus/blob/9ed85d6cc8e817270220f263a11e738135eb0ad3/cabal.project</a>), copy from line 39 to the end of the file and then paste it in the cabal.project file of the week 10 replacing old source repositories below the note <strong>The following sections are copied from the 'plutus' repository</strong></p>
</blockquote>
<p>Also you should update the endpoints code, as it has changed (you can take for reference endpoints code from TokenSale.hs in Lesson 08). Consider that <code>endpoint</code> function returns a promise now.</p>
<pre><code>endpoints :: Contract () FreeSchema Text ()
endpoints = forever
          $ handleError logError
          $ awaitPromise
          $ endpoint @&quot;mint&quot; $ mint
</code></pre>
<p><strong>------------ UPDATE ---------</strong></p>
<p><strong><code>547e22a975d9b688ad2121f56e63691bead661cc</code>
It's working for lessons 05, 08 and 10</strong></p>

CC BY-SA 4.0
2021-10-08T15:21:57.370Z
Got it thanks. How did you arrive at the conclusion that `547e22a975d9b688ad2121f56e63691bead661cc` is the appropriate commit? Is that documented somewhere or did you test out various commits until you found one that works?
Paymahn Moghadasian
CC BY-SA 4.0
2021-10-08T15:51:04.010Z
Just tried it. It's working for lesson 05, 08 and 10.
georgeos
CC BY-SA 4.0
2021-10-08T20:38:53.673Z
Great! I'm seeing the compilation problem generally fixed too but I can't seem to figure out how to update the `endpoints` function to work. Any chance you can provide that too? I see that in the `TokenSale` of lesson 8 they use `forever` and `awaitPromise` but trying to use that code isn't very straightforward for me as a haskell novice.
Paymahn Moghadasian
CC BY-SA 4.0
2021-10-11T04:00:20.607Z
Sorry for the delay, I took a few days off. Check my updated answer.
georgeos
CC BY-SA 4.0
2021-10-11T14:55:17.617Z
Much ❤ - thanks for the update
Paymahn Moghadasian
CC BY-SA 4.0
2021-10-07T22:38:24.707Z
2021-10-11T03:58:49.733Z
2021-10-11T03:58:49.733Z
georgeos
<p>The <code>cabal.project</code> file for Week 5 of the Plutus Pioneer program points to commit <code>8f1a47674a99ac9bc2aba3231375d8d6de0641d2</code> for the Plutus repo but that commit seems to not exist based on:</p>
<pre><code> 2:22PM /Users/paymahn/plutus master ✱
 ❯❯❯ git checkout 8f1a47674a99ac9bc2aba3231375d8d6de0641d2
fatal: reference is not a tree: 8f1a47674a99ac9bc2aba3231375d8d6de0641d2
</code></pre>
<p>and <a href="https://github.com/input-output-hk/plutus/search?q=8f1a47674a99ac9bc2aba3231375d8d6de0641d2" rel="nofollow noreferrer">this github search for the commit</a>. Is this known? What's the correct Plutus commit for the week 5 homework? This is preventing <code>cabal build</code> and <code>cabal repl</code> from running successfully:</p>
<pre><code> 2:24PM /Users/paymahn/plutus-pioneer-program/code/week05 (nix) main ✱ ◼
 ❯❯❯ cabal build
remote: Enumerating objects: 728, done.
remote: Counting objects: 100% (728/728), done.
remote: Compressing objects: 100% (285/285), done.
remote: Total 728 (delta 451), reused 666 (delta 400), pack-reused 0
Receiving objects: 100% (728/728), 184.31 KiB | 174.00 KiB/s, done.
Resolving deltas: 100% (451/451), completed with 138 local objects.
From https://github.com/input-output-hk/plutus
   daeb13477..c5083fce6  master                             -&gt; origin/master
 * [new branch]          SCP-2858-chain-index-securityParam -&gt; origin/SCP-2858-chain-index-securityParam
 + b63ecf5b2...4b94768e7 bezirg/costparams-test             -&gt; origin/bezirg/costparams-test  (forced update)
 + 1d4eb1d72...4bd02c105 bezirg/retained-csv                -&gt; origin/bezirg/retained-csv  (forced update)
 + 9441f7f66...971377a54 component-modules                  -&gt; origin/component-modules  (forced update)
   7f77abdb3..a0258b9ba  hkm/ghcjs-cross                    -&gt; origin/hkm/ghcjs-cross
 + 4f24c5258...a8be7ab68 hrajchert/scp-2779-fix-toast-when-reloading -&gt; origin/hrajchert/scp-2779-fix-toast-when-reloading  (forced update)
   a1db411af..ed7e61160  jmchapman/ck-cek-eq                -&gt; origin/jmchapman/ck-cek-eq
   b59aebf75..fec18d337  kwxm/list-sort-benchmarks          -&gt; origin/kwxm/list-sort-benchmarks
 * [new branch]          merivale/marlowe-run-architecture  -&gt; origin/merivale/marlowe-run-architecture
   ffb13a295..116d4d116  scp-1582-actus-quick-check         -&gt; origin/scp-1582-actus-quick-check
 + 5a78a0736...879fed306 scp-2782-sqlite-in-freer-extras    -&gt; origin/scp-2782-sqlite-in-freer-extras  (forced update)
 + 9b1ca49b0...d3fb79c45 scp-2783-chain-index-pagination    -&gt; origin/scp-2783-chain-index-pagination  (forced update)
 + 8d679192d...0b8e46ead scp-2796-chain-index-query-utxo-currenty -&gt; origin/scp-2796-chain-index-query-utxo-currenty  (forced update)
 * [new branch]          scp-2883-actus-derivative-contracts -&gt; origin/scp-2883-actus-derivative-contracts
fatal: reference is not a tree: 8f1a47674a99ac9bc2aba3231375d8d6de0641d2
</code></pre>

<plutus-pioneer-program>
Plutus Pioneer Program Week missing commit
# Plutus Pioneer Program Week missing commit

(Asked by: username_0 on 2021-10-07)

The cabal.project file for Week 5 of the Plutus Pioneer program points to commit 8f1a47674a99ac9bc2aba3231375d8d6de0641d2 for the Plutus repo but that commit seems to not exist based on:
 2:22PM /Users/paymahn/plutus master ✱
 ❯❯❯ git checkout 8f1a47674a99ac9bc2aba3231375d8d6de0641d2
fatal: reference is not a tree: 8f1a47674a99ac9bc2aba3231375d8d6de0641d2

and this github search for the commit. Is this known? What's the correct Plutus commit for the week 5 homework? This is preventing cabal build and cabal repl from running successfully:
 2:24PM /Users/paymahn/plutus-pioneer-program/code/week05 (nix) main ✱ ◼
 ❯❯❯ cabal build
remote: Enumerating objects: 728, done.
remote: Counting objects: 100% (728/728), done.
remote: Compressing objects: 100% (285/285), done.
remote: Total 728 (delta 451), reused 666 (delta 400), pack-reused 0
Receiving objects: 100% (728/728), 184.31 KiB | 174.00 KiB/s, done.
Resolving deltas: 100% (451/451), completed with 138 local objects.
From https://github.com/input-output-hk/plutus
   daeb13477..c5083fce6  master                             -> origin/master
 * [new branch]          SCP-2858-chain-index-securityParam -> origin/SCP-2858-chain-index-securityParam
 + b63ecf5b2...4b94768e7 bezirg/costparams-test             -> origin/bezirg/costparams-test  (forced update)
 + 1d4eb1d72...4bd02c105 bezirg/retained-csv                -> origin/bezirg/retained-csv  (forced update)
 + 9441f7f66...971377a54 component-modules                  -> origin/component-modules  (forced update)
   7f77abdb3..a0258b9ba  hkm/ghcjs-cross                    -> origin/hkm/ghcjs-cross
 + 4f24c5258...a8be7ab68 hrajchert/scp-2779-fix-toast-when-reloading -> origin/hrajchert/scp-2779-fix-toast-when-reloading  (forced update)
   a1db411af..ed7e61160  jmchapman/ck-cek-eq                -> origin/jmchapman/ck-cek-eq
   b59aebf75..fec18d337  kwxm/list-sort-benchmarks          -> origin/kwxm/list-sort-benchmarks
 * [new branch]          merivale/marlowe-run-architecture  -> origin/merivale/marlowe-run-architecture
   ffb13a295..116d4d116  scp-1582-actus-quick-check         -> origin/scp-1582-actus-quick-check
 + 5a78a0736...879fed306 scp-2782-sqlite-in-freer-extras    -> origin/scp-2782-sqlite-in-freer-extras  (forced update)
 + 9b1ca49b0...d3fb79c45 scp-2783-chain-index-pagination    -> origin/scp-2783-chain-index-pagination  (forced update)
 + 8d679192d...0b8e46ead scp-2796-chain-index-query-utxo-currenty -> origin/scp-2796-chain-index-query-utxo-currenty  (forced update)
 * [new branch]          scp-2883-actus-derivative-contracts -> origin/scp-2883-actus-derivative-contracts
fatal: reference is not a tree: 8f1a47674a99ac9bc2aba3231375d8d6de0641d2

**Tags:** plutus-pioneer-program

---

## 2 answers

### Answer by username_0 on 2021-10-11. Score: 1 | Accepted answer

Turns out using the commit from Week06, `8a20664f00d8f396920385947903761a9a897fe0`, is the cleanest solution (too bad it wasn't merged at the time of asking this question): <https://github.com/input-output-hk/plutus-pioneer-program/pull/36>

This commit doesn't require any changes to the `endpoints` or updating any imports.


---

### Answer by username_1 on 2021-10-07. Score: 4

You should be aware that plutus is changing constantly, so some commits aren't working anymore.
In this case, you can use this commit hash: 547e22a975d9b688ad2121f56e63691bead661cc (or this one 9ed85d6cc8e817270220f263a11e738135eb0ad3 as mentioned in following comment) but remember to update your cabal.project according to this, from Antonio Ibarra IOHK:

when you update the Plutus Hash in the cabal.project file, you will also need to update the hash of all source repositories. To do that you can go to the cabal.project original repository in the defined commit (in this case https://github.com/input-output-hk/plutus/blob/9ed85d6cc8e817270220f263a11e738135eb0ad3/cabal.project), copy from line 39 to the end of the file and then paste it in the cabal.project file of the week 10 replacing old source repositories below the note The following sections are copied from the 'plutus' repository

Also you should update the endpoints code, as it has changed (you can take for reference endpoints code from TokenSale.hs in Lesson 08). Consider that endpoint function returns a promise now.
endpoints :: Contract () FreeSchema Text ()
endpoints = forever
          $ handleError logError
          $ awaitPromise
          $ endpoint @"mint" $ mint

------------ UPDATE ---------
547e22a975d9b688ad2121f56e63691bead661cc
It's working for lessons 05, 08 and 10

> **Comments:**
> **username_0**: Got it thanks. How did you arrive at the conclusion that `547e22a975d9b688ad2121f56e63691bead661cc` is the appropriate commit? Is that documented somewhere or did you test out various commits until you found one that works?  
> **username_1**: Just tried it. It's working for lesson 05, 08 and 10.  
> **username_0**: Great! I'm seeing the compilation problem generally fixed too but I can't seem to figure out how to update the `endpoints` function to work. Any chance you can provide that too? I see that in the `TokenSale` of lesson 8 they use `forever` and `awaitPromise` but trying to use that code isn't very straightforward for me as a haskell novice.  
> **username_1**: Sorry for the delay, I took a few days off. Check my updated answer.  
> **username_0**: Much ❤ - thanks for the update  

---

