<p>Yes. You can just write a grab transaction where the whole 100ADA utxo gift is consumed by creating 2 utxo outputs: 1ADA for the grabber and 99ADA back to the script perhaps with a script update pointing to new output address.</p>
<p>If the 100ADA gifts are made up of smaller UTXOs then just choose from those.</p>

CC BY-SA 4.0
2022-01-23T20:01:06.730Z
How would I do this what functions in the Plutus library should I look up?
Floof99
CC BY-SA 4.0
2022-01-24T09:13:37.533Z
If you look at homework 2, what one can do I think is use the grab function. utxos in that function has a list of all utxos from address/ One can 1 ADA from that for the grabber then call the give function within grab to send the 99 ADA back to the script.This is all of course conceptual from me as I'm also just learning. I might try to play around with it and see if I can implement it.
d_fajardo
CC BY-SA 4.0
2022-01-23T18:57:09.867Z
2022-01-23T18:57:09.867Z
d_fajardo
<p>No, it's a utxo system, so any inputs need a corresponding output. Now, the output could be to the script address itself depending on how the smart contract is written. The NFT auction from week 1 of Plutus pioneers showed how this is done for example.</p>

CC BY-SA 4.0
2022-01-23T18:25:30.390Z
2022-01-23T18:25:30.390Z
Samuel Leathers
<p>I know that you can use collectFromScript to take all of the value from a script but is there a way to make it so you only take 1 ADA from a Script that holds 100 ADA?</p>
<p>Thank you</p>

CC BY-SA 4.0
2022-02-05T02:54:58.000Z
This question was asked again in more elaborate form a few hours later here: [link](https://cardano.stackexchange.com/questions/6795/what-documentation-works-with-handling-utxos-at-the-plutus-script).  Please edit questions rather than splintering them; that keeps our Stack Exchange concise and more useful.
Hysteria
<plutus><plutus-pioneer-program><plutus-playground>
Can I control the amount spent by a plutus Script
# Can I control the amount spent by a plutus Script

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

I know that you can use collectFromScript to take all of the value from a script but is there a way to make it so you only take 1 ADA from a Script that holds 100 ADA?

Thank you

**Tags:** plutus, plutus-pioneer-program, plutus-playground
> **Comments:**
> **username_1**: This question was asked again in more elaborate form a few hours later here: [link](https://cardano.stackexchange.com/questions/6795/what-documentation-works-with-handling-utxos-at-the-plutus-script).  Please edit questions rather than splintering them; that keeps our Stack Exchange concise and more useful.  

---

## 2 answers

### Answer by username_2 on 2022-01-23. Score: 1

Yes. You can just write a grab transaction where the whole 100ADA utxo gift is consumed by creating 2 utxo outputs: 1ADA for the grabber and 99ADA back to the script perhaps with a script update pointing to new output address.

If the 100ADA gifts are made up of smaller UTXOs then just choose from those.

> **Comments:**
> **username_0**: How would I do this what functions in the Plutus library should I look up?  
> **username_2**: If you look at homework 2, what one can do I think is use the grab function. utxos in that function has a list of all utxos from address/ One can 1 ADA from that for the grabber then call the give function within grab to send the 99 ADA back to the script.This is all of course conceptual from me as I'm also just learning. I might try to play around with it and see if I can implement it.  

---

### Answer by username_3 on 2022-01-23. Score: 0

No, it's a utxo system, so any inputs need a corresponding output. Now, the output could be to the script address itself depending on how the smart contract is written. The NFT auction from week 1 of Plutus pioneers showed how this is done for example.


---

