makeRedeemerValidator
[!CAUTION]
This method is deprecated as of Plutus V3
As said in [makeValidator
], once on-chain contracts are not typed.
makeRedeemerValidator
is used for contract that do not expect a datum as first argument.
The type signature is:
export function makeRedeemerValidator(
typedValidator: Term<
PLam<
PType,
PLam<
typeof PScriptContext,
PBool
>
>
>,
errorMessage?: string
): TermFn<[PData,PData], PUnit>
As you can see it takes any typed validator and returns a generic untyped validator so that the node will be able to evaluate it correctly.
errorMessage
Optionally you can pass a string
that will be included in the on-chain script and passed to ptrace
in case of failure