<p>Currency symbols can't be arbitrary byte strings, they must consist of hexadecimal digits. So you can't use <code>Token</code>, and the error message is complaining about the <code>T</code>. Use something like <code>ff</code> instead.</p>

CC BY-SA 4.0
2021-07-22T12:42:10.697Z
2021-07-22T12:42:10.697Z
Lars Brünjes
<p>I tried to equip the <code>EnglishAuction.hs</code> contract from Plutus Pioneer Program week 01 with test routine designed according to what Lars presented in later lectures:</p>
<pre><code>doTest :: IO()
doTest = runEmulatorTraceIO $ do
    let startParams = StartParams{spDeadline = 10, spMinBid = 5, spCurrency = &quot;Token&quot;, spToken = myTokenName}
    h1 &lt;- activateContractWallet (Wallet 1) endpoints
--    h2 &lt;- activateContractWallet (Wallet 2) endpoints
    callEndpoint @&quot;start&quot; h1 startParams
    void $ Emulator.waitNSlots 1
</code></pre>
<p>Then, however, I get a strange error which is caused by a line calling <code>activateContractWallet</code>. The message is mysterious and to me it carries no information:</p>
<pre><code>Prelude Week01.EnglishAuction&gt; Week01.EnglishAuction.doTest
*** Exception: not a hexit: 'T'
CallStack (from HasCallStack):
  error, called at src/Data/Either/Extras.hs:6:34 in plutus-ledger-api-0.1.0.0-307e91a82e48dc52f16a2602ae259f767995000a894e765e9c2a3c51ae53abfc:Data.Either.Extras
</code></pre>
<p>The full source of my modifications is here: <a href="https://gist.github.com/emesik/82f185dad3ecec6ec811530db4c51ff1" rel="nofollow noreferrer">https://gist.github.com/emesik/82f185dad3ecec6ec811530db4c51ff1</a></p>
<p><strong>edit:</strong> I see the error is caused by &quot;Token&quot; used as <code>spCurrency</code>. Haskell expects hexadecimal there, perhaps the ID of minting policy? How can I fix it?</p>

CC BY-SA 4.0
2021-06-08T01:33:32.440Z
Plutus is still in development. So while the Plutus Pioneer Program is taking place, things were expected to break. I think the first three weeks or so will not run with the updated Plutus Playground. There may be community contributions that modify the source to work with the current Plutus implementation.
Matthias Sieber
<plutus><plutus-pioneer-program>
Why does my test of Plutus contract crash?
# Why does my test of Plutus contract crash?

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

I tried to equip the EnglishAuction.hs contract from Plutus Pioneer Program week 01 with test routine designed according to what Lars presented in later lectures:
doTest :: IO()
doTest = runEmulatorTraceIO $ do
    let startParams = StartParams{spDeadline = 10, spMinBid = 5, spCurrency = "Token", spToken = myTokenName}
    h1 <- activateContractWallet (Wallet 1) endpoints
--    h2 <- activateContractWallet (Wallet 2) endpoints
    callEndpoint @"start" h1 startParams
    void $ Emulator.waitNSlots 1

Then, however, I get a strange error which is caused by a line calling activateContractWallet. The message is mysterious and to me it carries no information:
Prelude Week01.EnglishAuction> Week01.EnglishAuction.doTest
*** Exception: not a hexit: 'T'
CallStack (from HasCallStack):
  error, called at src/Data/Either/Extras.hs:6:34 in plutus-ledger-api-0.1.0.0-307e91a82e48dc52f16a2602ae259f767995000a894e765e9c2a3c51ae53abfc:Data.Either.Extras

The full source of my modifications is here: https://gist.github.com/emesik/82f185dad3ecec6ec811530db4c51ff1
edit: I see the error is caused by "Token" used as spCurrency. Haskell expects hexadecimal there, perhaps the ID of minting policy? How can I fix it?

**Tags:** plutus, plutus-pioneer-program
> **Comments:**
> **username_1**: Plutus is still in development. So while the Plutus Pioneer Program is taking place, things were expected to break. I think the first three weeks or so will not run with the updated Plutus Playground. There may be community contributions that modify the source to work with the current Plutus implementation.  

---

## 1 answers

### Answer by username_2 on 2021-07-22. Score: 6 | Accepted answer

Currency symbols can't be arbitrary byte strings, they must consist of hexadecimal digits. So you can't use `Token`, and the error message is complaining about the `T`. Use something like `ff` instead.


---

