Let DApp pay total transaction fee of user

Last updated 20 Jan 2023


...

@Verifier(tx)
func verifier() = {
match(tx) {
case inv:InvokeScriptTransaction =>
if (inv.function == "registerUser" && inv.dApp == this && inv.fee == 500000) then
sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[5])))
else
sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
case _ => sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
}
}