Closed bigirishlion closed 1 year ago
Hi @bigirishlion ! with_plutus_data(plutusData)
adds datum to a tx output. But if you need to use a datum for a plutus mint script, you need to use MintBuilder
API. Because for using a Plutus mint script, you need to provide a redeemer (not datum ) and a Plutus script to MintBuilder,
they will be placed to a witnesses set by MintBuilder
.
But if you need to create a tx output with inlined datum with_plutus_data
would be enough.
Hey @lisicky. Thanks for the reply! Sorry for the confusion, I'm not asking how to send datum to a mint contract, I'm asking how to have an output with both a minted asset and inline datum.
@bigirishlion you can create MintBuilder and TransactionOutput ( for example by TransactionOutputBuilder) with the same assets amount and add them to the tx builder. But add_mint_asset_and_output
should work too, but it less flexible.
Thanks @lisicky I was able to get it working using the code above and the MintBuilder.
I'm currently trying to craft a transaction that mints a token and provide datum for the UTxO output. I'm aware of the
add_mint_asset_and_output
but I can't figure out a way to do this and provide an output with datum.Here's what I've tried:
Any help is appreciated.