<p>i just finished my first script and would love to share some ideas and also to listen your opinion for additional development.</p>
<p>how the script works and what it does</p>
<ol>
<li>create Log file :)</li>
<li>while (looping)</li>
<li>save on a file with all UTXOs / TxHashes</li>
<li>new while (looping) , till all UTXOs on the previous file are read</li>
<li>save infos from the UTXOs in variables</li>
<li>if TX_hash is inside a file (we have created before)</li>
<li>then, old TX is found -&gt; go Up in the begin of the second While (step 4.)</li>
<li>else, new TX is found :)</li>
<li>find the sender of the Transaction by
curl -H 'project_id: mainnetsldfkjslfjlsjfowejfslvlsvn' <br />
<a href="https://cardano-mainnet.blockfrost.io/api/v0/txs/$%7Btx_hash%7D/utxos" rel="nofollow noreferrer">https://cardano-mainnet.blockfrost.io/api/v0/txs/${tx_hash}/utxos</a> <br />
| jq '.inputs' | jq '.[0]' | jq '.address' | sed 's/^.//;s/.$//')</li>
<li>if the balance is not the requested amount of ADA,
11, then, send the amount of ADA back (user will loose few ada , because of the Fee)</li>
<li>else, send Token to the address we find in step 9. :)</li>
</ol>
<p>who needs more help, i am happy to assist.
theTokenSquare17</p>

CC BY-SA 4.0
2022-01-26T18:40:23.847Z
This isn't a question...
Samuel Leathers
CC BY-SA 4.0
2022-01-26T22:48:14.483Z
This site is not for opinions/discussions.  Please take a look at this topic in the -> [help/dont-ask]
gRebel
<transaction><token><utxo><script>
script for automation sending tokens
# script for automation sending tokens

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

i just finished my first script and would love to share some ideas and also to listen your opinion for additional development.

how the script works and what it does

1. create Log file :)
2. while (looping)
3. save on a file with all UTXOs / TxHashes
4. new while (looping) , till all UTXOs on the previous file are read
5. save infos from the UTXOs in variables
6. if TX\_hash is inside a file (we have created before)
7. then, old TX is found -> go Up in the begin of the second While (step 4.)
8. else, new TX is found :)
9. find the sender of the Transaction by
   curl -H 'project\_id: mainnetsldfkjslfjlsjfowejfslvlsvn'   
   [https://cardano-mainnet.blockfrost.io/api/v0/txs/${tx\_hash}/utxos](https://cardano-mainnet.blockfrost.io/api/v0/txs/$%7Btx_hash%7D/utxos)   
   | jq '.inputs' | jq '.[0]' | jq '.address' | sed 's/^.//;s/.$//')
10. if the balance is not the requested amount of ADA,
    11, then, send the amount of ADA back (user will loose few ada , because of the Fee)
11. else, send Token to the address we find in step 9. :)

who needs more help, i am happy to assist.
theTokenSquare17

**Tags:** transaction, token, utxo, script
> **Comments:**
> **username_1**: This isn't a question...  
> **username_2**: This site is not for opinions/discussions.  Please take a look at this topic in the -> [help/dont-ask]  

---

## 0 answers

