mirror of
https://github.com/FiloSpaTeam/plutus-pioneer-program.git
synced 2024-11-13 02:12:34 +01:00
fix week02 homework2
This commit is contained in:
parent
8dc7452532
commit
a45c7866c1
1 changed files with 3 additions and 3 deletions
|
@ -43,9 +43,9 @@ PlutusTx.unstableMakeIsData ''MyRedeemer
|
||||||
{-# INLINABLE mkValidator #-}
|
{-# INLINABLE mkValidator #-}
|
||||||
-- This should validate if and only if the two Booleans in the redeemer are equal!
|
-- This should validate if and only if the two Booleans in the redeemer are equal!
|
||||||
mkValidator :: () -> MyRedeemer -> ScriptContext -> Bool
|
mkValidator :: () -> MyRedeemer -> ScriptContext -> Bool
|
||||||
mkValidator _ (MyRedeemer r) _ = traceIfFalse "Flags dont match" $ r.flag1 == r.flag2
|
mkValidator _ (MyRedeemer r x) _ = traceIfFalse "Flags dont match" $ r == x
|
||||||
s
|
|
||||||
dat Typed
|
data Typed
|
||||||
instance Scripts.ValidatorTypes Typed where
|
instance Scripts.ValidatorTypes Typed where
|
||||||
type instance DatumType Typed = ()
|
type instance DatumType Typed = ()
|
||||||
type instance RedeemerType Typed = MyRedeemer
|
type instance RedeemerType Typed = MyRedeemer
|
||||||
|
|
Loading…
Reference in a new issue