<p>Currently, Cardano has two types of addresses, verification key witnessed addresses and script witnessed address. The former allows spending of value (in the form of UTxOs) from that address if the transaction that specifies the spending contains the signature of the associated signing key. The latter allows the spending of value if the script that hashes to the address validates true given three arguments of the transaction. These are, the datum, the redeemer, and the context.</p>
<p>Without one of these, a script cannot validate, this is because the lowest level of code on the ledger (untyped plutus core) must have these inputs to derive its return value. The reason it needs inputs, is that it is a lambda calculus. This is a functional way of doing computation, and to return anything you need to reduce the lambda functions<a href="https://en.wikipedia.org/wiki/Lambda_calculus#Reduction" rel="nofollow noreferrer">(1)</a>. With a missing argument, you can only reduce to a certain point.</p>
<p>So, if a script requires a datum, but the UTxO at its address has none, it is unspendable (currently).</p>
<p><strong>DISCLAIMER:</strong> Besides plutus scripts, which I mainly touched upon, there are also simple scripts <a href="https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/simple-scripts.md" rel="nofollow noreferrer">(2)</a>. These are also scripts, but they do not need a datum! It is currently not possible to distinguish a plutus script address from a simple script address from solely their address. This means that your Trezor, will also flag the simple script address with that warning, though it is not needed. There is a CIP (Cardano improvement proposal) that tries to fix this by annotating each address with a script version indication <a href="https://github.com/cardano-foundation/CIPs/pull/310" rel="nofollow noreferrer">(3)</a>.</p>

CC BY-SA 4.0
2022-08-26T07:02:49.820Z
2022-08-26T07:02:49.820Z
Fermat
<p>When using a Trezor to sign a transaction with a script address as the receiver, I get the message &quot;The following transaction output contains a script address, but does not contain a datum.  Continue?&quot;.</p>
<p>If I confirm the signing of the transaction and complete sending, the transaction goes through and the balances are updated as expected.</p>
<p>From what I've read in various documentation, it's mentioned that a datum hash should be attached to the UTXO at the script address.  Does that mean that it is mandatory to have one in order for the script address to use the UTXO?</p>
<p>In my case where I did not attach a datum hash to the transaction, can the receiving script address spend the UTXO it was sent?</p>

<plutus><script><script-addresses>
What happens if I omit a datum hash in a transaction to a script address?
# What happens if I omit a datum hash in a transaction to a script address?

(Asked by: username_0 on 2022-08-25)

When using a Trezor to sign a transaction with a script address as the receiver, I get the message "The following transaction output contains a script address, but does not contain a datum. Continue?".

If I confirm the signing of the transaction and complete sending, the transaction goes through and the balances are updated as expected.

From what I've read in various documentation, it's mentioned that a datum hash should be attached to the UTXO at the script address. Does that mean that it is mandatory to have one in order for the script address to use the UTXO?

In my case where I did not attach a datum hash to the transaction, can the receiving script address spend the UTXO it was sent?

**Tags:** plutus, script, script-addresses

---

## 1 answers

### Answer by username_1 on 2022-08-26. Score: 2 | Accepted answer

Currently, Cardano has two types of addresses, verification key witnessed addresses and script witnessed address. The former allows spending of value (in the form of UTxOs) from that address if the transaction that specifies the spending contains the signature of the associated signing key. The latter allows the spending of value if the script that hashes to the address validates true given three arguments of the transaction. These are, the datum, the redeemer, and the context.

Without one of these, a script cannot validate, this is because the lowest level of code on the ledger (untyped plutus core) must have these inputs to derive its return value. The reason it needs inputs, is that it is a lambda calculus. This is a functional way of doing computation, and to return anything you need to reduce the lambda functions[(1)](https://en.wikipedia.org/wiki/Lambda_calculus#Reduction). With a missing argument, you can only reduce to a certain point.

So, if a script requires a datum, but the UTxO at its address has none, it is unspendable (currently).

**DISCLAIMER:** Besides plutus scripts, which I mainly touched upon, there are also simple scripts [(2)](https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/simple-scripts.md). These are also scripts, but they do not need a datum! It is currently not possible to distinguish a plutus script address from a simple script address from solely their address. This means that your Trezor, will also flag the simple script address with that warning, though it is not needed. There is a CIP (Cardano improvement proposal) that tries to fix this by annotating each address with a script version indication [(3)](https://github.com/cardano-foundation/CIPs/pull/310).


---

