How do i create a simple script that users can deposit ada into but only 100 ada per transactions , nothing less than that and nothing more. The transaction will not go through if it is not 100 Ada.

1 Answer 1


Cardano is a decentralized system, anyone can send anything to any address with any datum attached to it (no one can be censored). There is no way of stopping anyone from sending something to an address, and thats a good thing.

What you can do however is enforce the "spendabilty" of a script address that you created. So an UTxO at an address can only be spend if it sends 100 ada to a predefined address. What are you trying to achieve? If it is something along the line of; I want some to logic to be performed only if 100 ada is payed, then just add the above condition in that plutus validator.

  • Yeah , thats what I was trying to do. I only want to perform certain action if 100 ada is payed.
    – szhang9921
    Apr 6, 2022 at 16:04

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.