Skip to main content
edited body
Source Link

I should have used --tx-out-datum-embed-file instead of --tx-out-datum-hash-file. I did not understand data/embedded data/inlined data. Below is my understanding:

  • In regular case one transaction attaches a hash (with --tx-out-datum-hash-*) to an output sent to a script address. The transaction that consumes that output needs the actual data that is provided by --tx-in-datum-*.

  • Sometimes a script in the transaction that creates an output also needs the actual data present in the transaction (this is my case). Then it should use --tx-out-datum-embed-*. In this case the datum is added to txIinfoData in the transaction context of that producingproduces the transaction. The script in the transaction that consumes that output also needs the actual data in the transaction context (--tx-in-datum-*) so there are two instances of the data both in the transaction that creates the output and in the transaction that consumes it.

  • So in this case inlined data could be used: data is attached to the producer transaction with --tx-out-inline-datum-* and the consuming transaction has access to it if --tx-in-inline-datum-present is specified for that output.

I should have used --tx-out-datum-embed-file instead of --tx-out-datum-hash-file. I did not understand data/embedded data/inlined data. Below is my understanding:

  • In regular case one transaction attaches a hash (with --tx-out-datum-hash-*) to an output sent to a script address. The transaction that consumes that output needs the actual data that is provided by --tx-in-datum-*.

  • Sometimes a script in the transaction that creates an output also needs the actual data present in the transaction (this is my case). Then it should use --tx-out-datum-embed-*. In this case the datum is added to txIinfoData in the transaction context of that producing transaction. The script in the transaction that consumes that output also needs the actual data in the transaction context (--tx-in-datum-*) so there are two instances of the data both in the transaction that creates the output and in the transaction that consumes it.

  • So in this case inlined data could be used: data is attached to the producer transaction with --tx-out-inline-datum-* and the consuming transaction has access to it if --tx-in-inline-datum-present is specified for that output.

I should have used --tx-out-datum-embed-file instead of --tx-out-datum-hash-file. I did not understand data/embedded data/inlined data. Below is my understanding:

  • In regular case one transaction attaches a hash (with --tx-out-datum-hash-*) to an output sent to a script address. The transaction that consumes that output needs the actual data that is provided by --tx-in-datum-*.

  • Sometimes a script in the transaction that creates an output also needs the actual data present in the transaction (this is my case). Then it should use --tx-out-datum-embed-*. In this case the datum is added to txIinfoData in the transaction context that produces the transaction. The script in the transaction that consumes that output also needs the actual data in the transaction context (--tx-in-datum-*) so there are two instances of the data both in the transaction that creates the output and in the transaction that consumes it.

  • So in this case inlined data could be used: data is attached to the producer transaction with --tx-out-inline-datum-* and the consuming transaction has access to it if --tx-in-inline-datum-present is specified for that output.

Source Link

I should have used --tx-out-datum-embed-file instead of --tx-out-datum-hash-file. I did not understand data/embedded data/inlined data. Below is my understanding:

  • In regular case one transaction attaches a hash (with --tx-out-datum-hash-*) to an output sent to a script address. The transaction that consumes that output needs the actual data that is provided by --tx-in-datum-*.

  • Sometimes a script in the transaction that creates an output also needs the actual data present in the transaction (this is my case). Then it should use --tx-out-datum-embed-*. In this case the datum is added to txIinfoData in the transaction context of that producing transaction. The script in the transaction that consumes that output also needs the actual data in the transaction context (--tx-in-datum-*) so there are two instances of the data both in the transaction that creates the output and in the transaction that consumes it.

  • So in this case inlined data could be used: data is attached to the producer transaction with --tx-out-inline-datum-* and the consuming transaction has access to it if --tx-in-inline-datum-present is specified for that output.