user140: I'm trying to consume a UTxO from a script address. When querying the script address with cardano-cli query utxo, I have the following UTxO:
                           TxHash                                 TxIx        Amount
--------------------------------------------------------------------------------------
10668bed901733bb0977ec72d1abad481865b34ea1c18302caaaa1eafe5784d2     1        1344798 lovelace + TxOutDatumNone

However, when constructing a transaction, I do not know how to represent TxOutDatumNone:
cardano-cli transaction build \
--alonzo-era \
...
--tx-in 10668bed901733bb0977ec72d1abad481865b34ea1c18302caaaa1eafe5784d2#1 \
--tx-in-datum-value WHAT_TO_PUT_HERE \
...


What I've tried:

Not passing the --tx-in-datum-value altogether results in:


Missing: (--tx-in-datum-file FILE | --tx-in-datum-value JSON VALUE)


Passing --tx-in-datum-value 0 results in:


Command failed: transaction build  Error: The following scripts have execution failures:
the script for transaction input 0 (in the order of the TxIds) failed with:
The Plutus script witness for the txin does not have a script datum (according to the UTxO). The txin in question is 10668bed901733bb0977ec72d1abad481865b34ea1c18302caaaa1eafe5784d2#1


Passing --tx-in-datum-value null results in:


option --tx-in-datum-value: JSON schema error within the script data: null
JSON null values are not supported.


user5412: I'm afraid that presenting a "none" datum is not possible. This also means that this UtxO is lost (anybody, correct me if I'm wrong)
I don't know the very reason why it is possible to send a UtxO at a script address without datum hash, while at the same time it will not be possible to get it back. Anyway, pay attention to always send a datum hash when sending some value at a script address.

140: <p>I'm trying to consume a UTxO from a <em>script address</em>. When querying the script address with <code>cardano-cli query utxo</code>, I have the following UTxO:</p>
<pre><code>                           TxHash                                 TxIx        Amount
--------------------------------------------------------------------------------------
10668bed901733bb0977ec72d1abad481865b34ea1c18302caaaa1eafe5784d2     1        1344798 lovelace + TxOutDatumNone
</code></pre>
<p>However, when constructing a transaction, I do not know how to represent <code>TxOutDatumNone</code>:</p>
<pre><code>cardano-cli transaction build \
--alonzo-era \
...
--tx-in 10668bed901733bb0977ec72d1abad481865b34ea1c18302caaaa1eafe5784d2#1 \
--tx-in-datum-value WHAT_TO_PUT_HERE \
...
</code></pre>
<hr />
<p>What I've tried:</p>
<ul>
<li>Not passing the <code>--tx-in-datum-value</code> altogether results in:</li>
</ul>
<blockquote>
<p>Missing: (--tx-in-datum-file FILE | --tx-in-datum-value JSON VALUE)</p>
</blockquote>
<ul>
<li>Passing <code>--tx-in-datum-value 0</code> results in:</li>
</ul>
<blockquote>
<p>Command failed: transaction build  Error: The following scripts have execution failures:
the script for transaction input 0 (in the order of the TxIds) failed with:
The Plutus script witness for the txin does not have a script datum (according to the UTxO). The txin in question is 10668bed901733bb0977ec72d1abad481865b34ea1c18302caaaa1eafe5784d2#1</p>
</blockquote>
<ul>
<li>Passing <code>--tx-in-datum-value null</code> results in:</li>
</ul>
<blockquote>
<p>option --tx-in-datum-value: JSON schema error within the script data: null
JSON null values are not supported.</p>
</blockquote>
 5412: <p>I'm afraid that presenting a &quot;none&quot; datum is not possible. This also means that this UtxO is lost (anybody, correct me if I'm wrong)</p>
<p>I don't know the very reason why it is possible to send a UtxO at a script address without datum hash, while at the same time it will not be possible to get it back. Anyway, pay attention to always send a datum hash when sending some value at a script address.</p>
