<p>You can not disallow users to send ADA into your smartcontract script address.</p>
<p>You can only deny unlocking.</p>
<p>However you can check how much of value is being sent with outgoing transaction from txOut by checking txOutValue field.</p>

CC BY-SA 4.0
2022-01-07T12:45:36.887Z
2022-01-07T12:45:36.887Z
KugisMugis
<p>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?</p>
<p><code>(____ == ADA.lovelaceValueOf 30)</code></p>

<plutus><plutus-pioneer-program><ada><validator>
How do I call the amount of ADA sent to a validator script in an Integer
# How do I call the amount of ADA sent to a validator script in an Integer

(Asked by: username_0 on 2022-01-03)

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)`

**Tags:** plutus, plutus-pioneer-program, ada, validator

---

## 1 answers

### Answer by username_1 on 2022-01-07. Score: 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.


---

