From a45c7866c1d1e0e6fddf7b6febf868ea55e13096 Mon Sep 17 00:00:00 2001 From: Claudio Maradonna Date: Fri, 30 Jul 2021 18:51:03 +0200 Subject: [PATCH] fix week02 homework2 --- code/week02/src/Week02/Homework2.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/week02/src/Week02/Homework2.hs b/code/week02/src/Week02/Homework2.hs index 24b8ff0..df79962 100644 --- a/code/week02/src/Week02/Homework2.hs +++ b/code/week02/src/Week02/Homework2.hs @@ -43,9 +43,9 @@ PlutusTx.unstableMakeIsData ''MyRedeemer {-# INLINABLE mkValidator #-} -- This should validate if and only if the two Booleans in the redeemer are equal! mkValidator :: () -> MyRedeemer -> ScriptContext -> Bool -mkValidator _ (MyRedeemer r) _ = traceIfFalse "Flags dont match" $ r.flag1 == r.flag2 -s -dat Typed +mkValidator _ (MyRedeemer r x) _ = traceIfFalse "Flags dont match" $ r == x + +data Typed instance Scripts.ValidatorTypes Typed where type instance DatumType Typed = () type instance RedeemerType Typed = MyRedeemer