0

I'm using this script to check but this doesn't works for me

import    Prelude  hiding (Eq)

mkPolicy :: PubKeyHash -> PubKeyHash -> TokenName -> BuiltinData -> ScriptContext -> Bool
mkPolicy owner1 owner2 name _redeemer ctx = checkOwnerHashDifferent

    checkOwnerHashDifferent :: Bool
    checkOwnerHashDifferent =  Eq owner1 owner2

can someone help me to resolve this?

1 Answer 1

1

Eq is a type class and hence will not work as you have used it above.

Assuming that PubKeyHash has an Eq typeclass instance you just need:

    checkOwnerHashDifferent :: Bool
    checkOwnerHashDifferent =  owner1 == owner2

Your Answer

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

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