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

[ENHANCEMENT] QuickTx attaches Minting Script even in presence of Reference Input #59

Open
nemo83 opened this issue Mar 22, 2024 · 0 comments

Comments

@nemo83
Copy link
Contributor

nemo83 commented Mar 22, 2024

Hello team!

I am building a complex ScriptTx similar to:

var mintingScript = PlutusBlueprintUtil.getPlutusScriptFromCompiledCode("590b9...73c1", PlutusVersion.v2);
var mintingScriptHash = mintingScript.getScriptHash();
var scriptTx = new ScriptTx()
                .collectFrom(...)
                .payToContract("addr1w...", ValueUtil.toAmountList(amount), datum)
                .payToAddress(account.baseAddress(), ValueUtil.toAmountList(amount2))
                .mintAsset(mintingScript, asset, BigIntPlutusData.of(0))
                .readFrom("<minting script ref input>", 0)
                .withChangeAddress(account.baseAddress());

First of all the minting script object is loaded from the CBOR of the script.

When I use QuickTx, the TX built, that is correct and passes offchain validation (I haven't submitted it yet onchain!), contains the CBOR of the minting script despite the Ref Input for such script is already present.

I would like to request 2 enhancements:

  1. the minting script should not require the actual CBOR of the script to be available, in theory, script hash should suffice for quick tx to fetch it, whether required, during validation.
  2. if a ref input for a minting script is available, no minting script CBOR should be added to the tx body (I think in the witnesses section)

Hope this makes sense, and as usual great work in this amazing library.

🙏

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

No branches or pull requests

1 participant