Plutus Tutorial

Hi!

I am currently doing the “Writing a basic Plutus app in the Plutus Playground” tutorial and receive the following error:

error:
Not in scope: ‘PlutusTx.unstableMakeIsData’
Module ‘Language.PlutusTx’ does not export ‘unstableMakeIsData’.
|
26 | PlutusTx.unstableMakeIsData ''SplitData

This seems like “unstableMakesIsData” is not part of the PlutusTx package. My imports look like this

import Control.Monad (void)
import Data.Aeson (FromJSON, ToJSON)
import qualified Data.Text as T
import GHC.Generics (Generic)
import Language.Plutus.Contract
import qualified Language.PlutusTx as PlutusTx
import Language.PlutusTx.Prelude
import Ledger

Can someone please help out with this? Or give me any hint to how to resolve this? After some research I was not able to find anything useful and besides, I am a Haskell/Plutus newbie.

Thanks!

2 Likes

Hello,

I can’t pinpoint exactly what is causing your error, but I can see that you are missing some of the imports.
Here’s a full list of the necessary imports:

import           Control.Monad             (void)
import           Data.Aeson                (FromJSON, ToJSON)
import qualified Data.Text                 as T
import           GHC.Generics              (Generic)
import           Language.Plutus.Contract
import qualified Language.PlutusTx         as PlutusTx
import           Language.PlutusTx.Prelude
import           Ledger
import qualified Ledger.Ada                as Ada
import qualified Ledger.Constraints        as Constraints
import qualified Ledger.Typed.Scripts      as Scripts
import           Schema
import           Wallet.Emulator.Wallet

I will also take this opportunity to link you to this gist that contains the code for the tutorial and it is working:

1 Like

Hi!

Thanks for the github link! The imports were fine, I copied only a few.

However, the error is that this 'PlutusTx.unstableMakeIsData ''SplitData PlutusTx.makeLift ''SplitData is incorrect. It should be

PlutusTx.makeIsData ''SplitData
PlutusTx.makeLift ''SplitData

And not unstableMakeIsData

Thanks!

2 Likes

I’m also running into problems working through this fund split tutorial. Specifically, I was following this page: Writing a basic Plutus app in the Plutus Playground and typing the code in while reading.

There are some parts that seem out of date, like these defs

lock :: Contract () SplitSchema T.Text LockArgs
lock = endpoint @"lock"

unlock :: Contract () SplitSchema T.Text LockArgs
unlock = endpoint @"unlock"

From the API docs, it looks like Contract has the type newtype Contract s e a = Contract ... so taking one less type.

Using Phantom_of_the_Opera’s gist, the () type is extra in the tutorial code samples. Yoshiplutus’ issue was also happening to me, there is no longer a PlutusTx.unstableMakeIsData

Thanks for writing about this and helping me to figure it out.

I plan to fork https://github.com/input-output-hk/plutus and start making documentation PRs.

3 Likes