8

Hello all I can find is the cardano-cli help and https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/cardano-node-cli-reference.md/ I am trying to get information on things like what --tx-out-datum-embed-file FILE does

1
  • This is a cop-out answer, but in my experience there surest place to go for answers is to read the source code directly.
    – waalge
    Feb 24, 2022 at 9:24

2 Answers 2

3

The flag --tx-out-datum-embed-file FILE allows you to embed the datum data on the transaction, not the datum hash like using that flag --tx-out-datum-hash-file FILE.

cardano-cli transaction build --tx-out-datum-embed-file DATUM.json

According to this web page, the definition is vague: The script datum to embed in the tx for this output, in the given JSON file. The file must follow the special JSON schema for script data.

I totally agree with you that a topic on datums/redeemers in JSON format for Tx is undocumented. However, I managed to find a very interesting GitHub post, which, I hope, will shed a light on some unclear things – Here it is. Unfortunately, that's all I could find on this topic.

2
  • 1
    I Appreciate the reference. I still wouldn't know how to actually create a json file that can be directly uploaded from these. Like would I put the path to an arbitrary file in the fields value of another json file, or do I have to encode to cbor first. Its all very incomplete
    – noone392
    Jan 10, 2022 at 0:13
  • I've updated my answer.
    – Andy Jazz
    Jan 10, 2022 at 22:34
1

I'm trying to learn this too. I could not find any further documentation other than the cardano-cli command help. This is pretty extensive and useful. Every command argument seems to have built-in help. So, for instance, to get help with building a transaction, issue the command cardano-cli transaction build. The help for this includes some info on the --tx-out-datum-embed-file FILE arguments.

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.