1

I'm trying to get the specified transaction's datum value, but it didn't appear in the cardano-db-sync db. Can anyone enlighten me, please?

the transaction: https://cardanoscan.io/transaction/74b2639cb3bf558545e1bf4f5117d006c093385dadf539f41295153192af0ebf?tab=utxo

  1. Datum and inline_datum_id didn't appear (NULL value) in the tx_out table as the following
select 
    address,
    inline_datum_id,
    (select substring(cast(hash as varchar),3) from tx where id = T1.tx_id) txhash,
    (select value from datum where tx_id = T1.tx_id) datum
from tx_out T1 
where tx_id = 75437263

address                                                                                                |inline_datum_id|txhash                                                          |datum|
-------------------------------------------------------------------------------------------------------+---------------+----------------------------------------------------------------+-----+
addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxzv34sh40d6k0vud6w4mkqew7gsr3fuw7pu7jerszgghjk0s5xtpcd|               |74b2639cb3bf558545e1bf4f5117d006c093385dadf539f41295153192af0ebf|     |
addr1q9kmkl3xwjm9sxymcppx7jlft8vr4ux6v2wp5c8x49pamdf557v3rld8xnpm79a8h8wcvs7fy78zlth6vae0nxyq7aksnectvv|               |74b2639cb3bf558545e1bf4f5117d006c093385dadf539f41295153192af0ebf|     |
addr1qx7tzh4qen0p50ntefz8yujwgqt7zulef6t6vrf7dq4xa82j2c79gy9l76sdg0xwhd7r0c0kna0tycz4y5s6mlenh8pqrkj6fh|               |74b2639cb3bf558545e1bf4f5117d006c093385dadf539f41295153192af0ebf|     |

  1. It still appears on cardanoscan.io: https://cardanoscan.io/transaction/74b2639cb3bf558545e1bf4f5117d006c093385dadf539f41295153192af0ebf?tab=utxo

enter image description here

Actual datum value: https://cardanoscan.io/datumInspector?datum=d8799fd8799f4040ffd8799f581ccded41e880c3facb6364e903d9830d52bb12fcf10f6401eda355fbd24653414c4d4f4eff1a0bebc20000d8799fd8799fd8799fd8799f581caafb1196434cb837fd6f21323ca37b302dff6387e8a84b3fa28faf56ffd8799fd8799fd8799f581c52563c5410bff6a0d43ccebb7c37e1f69f5eb260552521adff33b9c2ffffffffd87a80ffffff

Thank you

1
  • Because Cardanoscan does lots of processing most of the time to derive the datum value even if it is not part of the output. Thanks
    – manhdt
    Oct 21, 2023 at 4:14

1 Answer 1

2

A tx_out may have a datum_hash, without having an inline_datum_id, since not all datums are inlined. Inline datums were introduced in the Babbage era as an optimization mechanism.

Also, the Tx that you mentioned runs some Plutus scripts. This implies that it consumes and does not necessarily create outputs that have a datum. So you should probably check the tx_in of the tx and not its tx_out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.