Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method to add full datum to transaction in output_builder #56

Open
SebastienGllmt opened this issue Apr 29, 2022 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@SebastienGllmt
Copy link
Contributor

SebastienGllmt commented Apr 29, 2022

Currently, the output builder provides a with_data_hash function. This is all you need for the majority of use cases, but in some cases people may want to provide the full Plutus datum into the transaction witness even though it only shows up in the output (communication datum)

We should enable this as a possibility while also making it clear from the function name that this isn't the usual way to do it.

@SebastienGllmt SebastienGllmt added the enhancement New feature or request label Apr 29, 2022
@AngelCastilloB
Copy link

AngelCastilloB commented May 8, 2022

Isn't this already possible by calling add_plutus_datum in the TransactionWitnessSetBuilder ?, my project is one of those such cases in which the validator needs both the full current and the next datum values (to enforce state transition rules on the datum data).

I am looking to migrate to this library from the serialization lib, I was hoping this was already supported.

If I understand correctly, you must call with_data_hash on the TransactionOutputBuilder and then make sure to include the full datum on the witness set by calling add_plutus_datum in the TransactionWitnessSetBuilder.

This would emulate the tx-out-datum-value on the cardano cli.

@jmagan
Copy link

jmagan commented Jul 26, 2022

Hi!, I wrote a posible workaround in this issue:

Emurgo/cardano-serialization-lib#443 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants