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