File tree Expand file tree Collapse file tree 3 files changed +18
-15
lines changed
eras/conway/impl/scls-export/src/Cardano/Ledger/Export/Namespace
libs/ledger-state/app-canonical Expand file tree Collapse file tree 3 files changed +18
-15
lines changed Original file line number Diff line number Diff line change @@ -101,16 +101,16 @@ source-repository-package
101101 type : git
102102 location : https://github.com/tweag/cardano-canonical-ledger.git
103103 subdir : scls-cbor
104- tag : 09f2b80d6d0c7419053e3f9e70ff57acbcff0eec
104+ tag : d622dd31d05006af9220af4cf4b0bf87fae2971b
105105
106106source-repository-package
107107 type : git
108108 location : https://github.com/tweag/cardano-canonical-ledger.git
109109 subdir : scls-format
110- tag : 09f2b80d6d0c7419053e3f9e70ff57acbcff0eec
110+ tag : d622dd31d05006af9220af4cf4b0bf87fae2971b
111111
112112source-repository-package
113113 type : git
114114 location : https://github.com/tweag/cardano-canonical-ledger.git
115115 subdir : merkle-tree-incremental
116- tag : 09f2b80d6d0c7419053e3f9e70ff57acbcff0eec
116+ tag : d622dd31d05006af9220af4cf4b0bf87fae2971b
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ instance FromCanonicalCBOR V1 (Babbage.BabbageTxOut MaryEra) where
189189 t -> fail $ " Unknown BabbageTxOut tag: " <> show t
190190
191191
192- instance Typeable kr => ToCanonicalCBOR V1 (Credential kr ) where
192+ instance ToCanonicalCBOR V1 (Credential kr ) where
193193 toCanonicalCBOR v (ScriptHashObj sh) = toCanonicalCBOR v (0 :: Word8 , sh )
194194 toCanonicalCBOR v (KeyHashObj kh) = toCanonicalCBOR v (1 :: Word8 , kh )
195195
@@ -225,7 +225,7 @@ deriving via (LedgerCBOR v MaryValue) instance ToCanonicalCBOR v MaryValue
225225deriving via (LedgerCBOR v MaryValue ) instance FromCanonicalCBOR v MaryValue
226226
227227
228- deriving via (LedgerCBOR v (KeyHash kr )) instance Typeable kr => ToCanonicalCBOR v (KeyHash kr )
228+ deriving via (LedgerCBOR v (KeyHash kr )) instance ToCanonicalCBOR v (KeyHash kr )
229229deriving via (LedgerCBOR v (KeyHash kr )) instance Typeable kr => FromCanonicalCBOR v (KeyHash kr )
230230deriving via (LedgerCBOR v (ScriptHash )) instance FromCanonicalCBOR v ScriptHash
231231deriving via (LedgerCBOR v (ScriptHash )) instance ToCanonicalCBOR v ScriptHash
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ module Main where
1515import Control.Exception (throwIO )
1616import Data.Bifunctor (first )
1717import Control.Monad
18+ import Data.Function ((&) )
19+ import Cardano.SCLS.Internal.Serializer.Dump.Plan
1820import qualified Data.ByteString.Lazy as LBS
1921import qualified Data.Text as T
2022import Cardano.Ledger.Mary (MaryEra )
@@ -112,16 +114,17 @@ main = do
112114 fileName
113115 Mainnet
114116 (SlotNo 1 )
115- $ S. each
116- [ " utxo" S. :>
117- S. each
118- [ ChunkEntry
119- (UtxoKeyIn txin)
120- (RawBytes $ toStrictByteString $ toCanonicalCBOR (Proxy :: Proxy V1 ) $ txout
121- )
122- | (txin, txout) <- Map. toList utxo
123- ]
124- ]
117+ (defaultSerializationPlan & addChunks
118+ (S. each
119+ [ " utxo" S. :>
120+ S. each
121+ [ ChunkEntry
122+ (UtxoKeyIn txin)
123+ (RawBytes $ toStrictByteString $ toCanonicalCBOR (Proxy :: Proxy V1 ) $ txout
124+ )
125+ | (txin, txout) <- Map. toList utxo
126+ ]
127+ ]))
125128
126129data TxIn' = TxIn' TxId Word16
127130
You can’t perform that action at this time.
0 commit comments