@@ -287,12 +287,7 @@ mkTxScript (hsh, script) =
287
287
plutusCborScript =
288
288
case script of
289
289
Alonzo. TimelockScript {} -> Nothing
290
- -- The serialization in cardano-api ignores the script version tag,
291
- -- but we handle both cases properly for posterity.
292
- Alonzo. PlutusScript Alonzo. PlutusV1 s ->
293
- Just . Api. serialiseToCBOR . Api. PlutusScript Api. PlutusScriptV1 $ Api. PlutusScriptSerialised s
294
- Alonzo. PlutusScript Alonzo. PlutusV2 s ->
295
- Just . Api. serialiseToCBOR . Api. PlutusScript Api. PlutusScriptV2 $ Api. PlutusScriptSerialised s
290
+ plutusScript -> Just $ Ledger. originalBytes plutusScript
296
291
297
292
getPlutusSizes ::
298
293
( HasField " wits" tx (Alonzo. TxWitness era )
@@ -315,7 +310,7 @@ txDataWitness tx =
315
310
mkTxData <$> Map. toList (Alonzo. unTxDats $ Alonzo. txdats' (getField @ " wits" tx))
316
311
317
312
mkTxData :: (Ledger. DataHash StandardCrypto , Alonzo. Data era ) -> PlutusData
318
- mkTxData (dataHash, dt) = PlutusData (dataHashToBytes dataHash) (jsonData dt) (cborData dt)
313
+ mkTxData (dataHash, dt) = PlutusData (dataHashToBytes dataHash) (jsonData dt) (Ledger. originalBytes dt)
319
314
where
320
315
jsonData :: Alonzo. Data era -> ByteString
321
316
jsonData =
@@ -324,9 +319,6 @@ mkTxData (dataHash, dt) = PlutusData (dataHashToBytes dataHash) (jsonData dt) (c
324
319
. Api. scriptDataToJson Api. ScriptDataJsonDetailedSchema
325
320
. Api. fromAlonzoData
326
321
327
- cborData :: Alonzo. Data era -> ByteString
328
- cborData = Api. serialiseToCBOR . Api. fromAlonzoData
329
-
330
322
extraKeyWits :: HasField " reqSignerHashes" (Ledger. TxBody era ) (Set (Ledger. KeyHash d c ))
331
323
=> Ledger. TxBody era -> [ByteString ]
332
324
extraKeyWits txBody = Set. toList $
0 commit comments