diff --git a/src/mint.ts b/src/mint.ts index 98da5af..d1f180e 100644 --- a/src/mint.ts +++ b/src/mint.ts @@ -138,10 +138,12 @@ const program = new Command() }); const createScript = (plutus: string, ref: UTxO.UTxO): PlutusV3 => { - const scriptHex = UPLC.applyParamsToScript(plutus, [ - TransactionHash.toBytes(ref.transactionId), - ref.index, - ]); + const scriptHex = UPLC.applySingleCborEncoding( + UPLC.applyParamsToScript(plutus, [ + TransactionHash.toBytes(ref.transactionId), + ref.index, + ]) + ); return new PlutusV3({ bytes: hexToBytes(scriptHex) }); }; diff --git a/src/nft.ts b/src/nft.ts index 87faccc..e20c722 100644 --- a/src/nft.ts +++ b/src/nft.ts @@ -133,9 +133,11 @@ const program = new Command() }); const createScript = (plutus: string, ref: UTxO.UTxO): PlutusV3 => { - const scriptHex = UPLC.applyParamsToScript(plutus, [ - TransactionHash.toBytes(ref.transactionId), - ]); + const scriptHex = UPLC.applySingleCborEncoding( + UPLC.applyParamsToScript(plutus, [ + TransactionHash.toBytes(ref.transactionId), + ]) + ); return new PlutusV3({ bytes: hexToBytes(scriptHex) }); };