mesh icon indicating copy to clipboard operation
mesh copied to clipboard

Search Mesh SDK for places where it needs plutus script normalization

Open PiotrNap opened this issue 3 months ago • 0 comments

Describe the feature you'd like

  • Investigate the codebase and list all places where we currently rely on double-encoded plutus scripts
  • The output should be a list of all methods/APIs that need plutus script normalization to accomodate for how we handle scripts internally

Is your feature request related to a problem? Please describe.

Yes, currently you need to somehow know that some of our APIs expect a double-encoded Cbor string, which makes the codebase harder to use.

Describe the solution you'd like

A list, either as a comment under this PR, or a document outlining each place where double-encoded Cbor string is expected. No code implementation should be done yet.

Additional context

Following up on the Discord conversation - https://discord.com/channels/907191435864977459/1420797584338976860

Currently, we are using the PlutusV#Script class from @cardano-sdk incorrectly. This is causing MeshTxBuilder.mintingScript and resolveScriptHash to expect double-encoded Cbor strings.

The incorrect PlutusV#Script usage - https://github.com/MeshJS/mesh/blob/main/packages/mesh-core-cst/src/utils/deserializer.ts#L24

Would you be willing to implement it?

  • [x] Yes, I will implement it.

PiotrNap avatar Sep 26 '25 08:09 PiotrNap