1

I am trying to create a validator function that only lets the user send ADA to the creator of the script if the user sends x amount of ADA how to I find out the amount of ADA the user sent and then put it in a boolean statement?

(____ == ADA.lovelaceValueOf 30)

1 Answer 1

1

You can not disallow users to send ADA into your smartcontract script address.

You can only deny unlocking.

However you can check how much of value is being sent with outgoing transaction from txOut by checking txOutValue field.

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.