makeRedeemerValidator
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:
port 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