0

I try to compile code from Plutus Pioneer Program week 4. These lines cause error.

typedValidator :: Scripts.TypedValidator Vesting
typedValidator = Scripts.mkTypedValidator @Vesting
    $$(PlutusTx.compile [|| mkValidator ||])
    $$(PlutusTx.compile [|| wrap ||])
  where
    wrap = Scripts.wrapValidator @VestingDatum @()

Here is the error:

Not in scope: `Scripts.wrapValidator'
Perhaps you meant one of these:
`Scripts.tvValidator' (imported from Ledger.Typed.Scripts),
data constructor `Scripts.TypedValidator' (imported from Ledger.Typed.Scripts)
Module `Ledger.Typed.Scripts' does not export `wrapValidator'.

That is strange because from the documentation there is the instance wrapValidator in Ledger.Typed.Scripts

wrapValidator :: forall d r. (UnsafeFromData d, UnsafeFromData r) => (d -> r -> ScriptContext -> Bool) -> WrappedValidatorType

How do I fix this?

1 Answer 1

0

Assuming the week04 code is unchanged, ensure you have run checked out commit ea1bfc in the plutus-apps repo and run nix-shell within plutus-apps. Then switch to the week 4 directory in the nix shell and cabal build should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.