<p>Currently, only datum <em>hashes</em> are able to be a part of the UTXO, so you are only able to <em>verify</em> a datum value on chain. Retrieving the datum itself is therefore on off-chain process.</p>
<p>However <a href="https://github.com/cardano-foundation/CIPs/pull/160" rel="nofollow noreferrer">CIP-32</a> is coming very soon (likely end of February/March) and will enable attaching the datum itself to a UTXO, rather than only the datum hash.</p>

CC BY-SA 4.0
2022-01-24T02:28:56.310Z
2022-01-24T02:28:56.310Z
zhekson
<p>How is Plutus on-chain code able to retrieve and decode datums from UTXOs of <code>ScriptContext</code>?</p>
<p>These datums are hardly found in cardano-db-sync or explorers anywhere?</p>

<plutus><utxo>
How are datums retrieved from UTXOs by on-chain code?
# How are datums retrieved from UTXOs by on-chain code?

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

How is Plutus on-chain code able to retrieve and decode datums from UTXOs of `ScriptContext`?

These datums are hardly found in cardano-db-sync or explorers anywhere?

**Tags:** plutus, utxo

---

## 1 answers

### Answer by username_1 on 2022-01-24. Score: 1 | Accepted answer

Currently, only datum *hashes* are able to be a part of the UTXO, so you are only able to *verify* a datum value on chain. Retrieving the datum itself is therefore on off-chain process.

However [CIP-32](https://github.com/cardano-foundation/CIPs/pull/160) is coming very soon (likely end of February/March) and will enable attaching the datum itself to a UTXO, rather than only the datum hash.


---

