Verifier function

A verifier function is a function of a dApp script that has @Verifier annotation.

A verifier function is responsible for validation of transactions and orders sent from dApp.

A dApp script can have only one verifier function.

A verifier function has no arguments.

Example

@Verifier(tx)
func verify() = {
    match tx {
        case _: Order|SetScriptTransaction =>
            sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
        case _ => false
    }
}

results matching ""

    No results matching ""