@@ -63,7 +63,6 @@ import Cardano.Ledger.BaseTypes (
63
63
StrictMaybe (.. ),
64
64
UnitInterval ,
65
65
invalidKey ,
66
- strictMaybeToMaybe ,
67
66
succVersion ,
68
67
)
69
68
import Cardano.Ledger.Binary (
@@ -75,8 +74,6 @@ import Cardano.Ledger.Binary (
75
74
decodeRecordNamed ,
76
75
decodeWord ,
77
76
encodeListLen ,
78
- encodeMapLen ,
79
- encodeWord ,
80
77
)
81
78
import Cardano.Ledger.Binary.Coders (Decode (From , RecD ), decode , (<!) )
82
79
import Cardano.Ledger.Coin (Coin (.. ))
@@ -99,12 +96,10 @@ import Data.Aeson (
99
96
(.=) ,
100
97
)
101
98
import qualified Data.Aeson as Aeson
102
- import Data.Foldable (fold )
103
99
import Data.Functor.Identity (Identity )
104
100
import Data.List (nub )
105
101
import Data.Map.Strict (Map )
106
102
import qualified Data.Map.Strict as Map
107
- import Data.Maybe (mapMaybe )
108
103
import Data.Proxy
109
104
import Data.Void
110
105
import Data.Word (Word16 , Word32 )
@@ -210,28 +205,6 @@ instance EraPParams ShelleyEra where
210
205
211
206
eraPParams = shelleyPParams
212
207
213
- instance Era era => EncCBOR (ShelleyPParams Identity era ) where
214
- encCBOR
215
- ShelleyPParams {.. } =
216
- encodeListLen 17
217
- <> encCBOR sppMinFeeA
218
- <> encCBOR sppMinFeeB
219
- <> encCBOR sppMaxBBSize
220
- <> encCBOR sppMaxTxSize
221
- <> encCBOR sppMaxBHSize
222
- <> encCBOR sppKeyDeposit
223
- <> encCBOR sppPoolDeposit
224
- <> encCBOR sppEMax
225
- <> encCBOR sppNOpt
226
- <> encCBOR sppA0
227
- <> encCBOR sppRho
228
- <> encCBOR sppTau
229
- <> encCBOR sppD
230
- <> encCBOR sppExtraEntropy
231
- <> encCBOR sppProtocolVersion
232
- <> encCBOR sppMinUTxOValue
233
- <> encCBOR sppMinPoolCost
234
-
235
208
instance Era era => DecCBOR (ShelleyPParams Identity era ) where
236
209
decCBOR = do
237
210
decodeRecordNamed " ShelleyPParams" (const 17 ) $
@@ -254,9 +227,6 @@ instance Era era => DecCBOR (ShelleyPParams Identity era) where
254
227
<*> decCBOR -- sppMinUTxOValue :: Natural
255
228
<*> decCBOR -- sppMinPoolCost :: Natural
256
229
257
- instance Era era => ToCBOR (ShelleyPParams Identity era ) where
258
- toCBOR = toEraCBOR @ era
259
-
260
230
instance Era era => FromCBOR (ShelleyPParams Identity era ) where
261
231
fromCBOR = fromEraCBOR @ era
262
232
@@ -376,35 +346,6 @@ data PPUpdateEnv = PPUpdateEnv SlotNo GenDelegs
376
346
instance NoThunks PPUpdateEnv
377
347
378
348
{-# DEPRECATED PPUpdateEnv "As unused" #-}
379
-
380
- instance Era era => EncCBOR (ShelleyPParams StrictMaybe era ) where
381
- encCBOR ppup =
382
- let l =
383
- mapMaybe
384
- strictMaybeToMaybe
385
- [ encodeMapElement 0 encCBOR =<< sppMinFeeA ppup
386
- , encodeMapElement 1 encCBOR =<< sppMinFeeB ppup
387
- , encodeMapElement 2 encCBOR =<< sppMaxBBSize ppup
388
- , encodeMapElement 3 encCBOR =<< sppMaxTxSize ppup
389
- , encodeMapElement 4 encCBOR =<< sppMaxBHSize ppup
390
- , encodeMapElement 5 encCBOR =<< sppKeyDeposit ppup
391
- , encodeMapElement 6 encCBOR =<< sppPoolDeposit ppup
392
- , encodeMapElement 7 encCBOR =<< sppEMax ppup
393
- , encodeMapElement 8 encCBOR =<< sppNOpt ppup
394
- , encodeMapElement 9 encCBOR =<< sppA0 ppup
395
- , encodeMapElement 10 encCBOR =<< sppRho ppup
396
- , encodeMapElement 11 encCBOR =<< sppTau ppup
397
- , encodeMapElement 12 encCBOR =<< sppD ppup
398
- , encodeMapElement 13 encCBOR =<< sppExtraEntropy ppup
399
- , encodeMapElement 14 encCBOR =<< sppProtocolVersion ppup
400
- , encodeMapElement 15 encCBOR =<< sppMinUTxOValue ppup
401
- , encodeMapElement 16 encCBOR =<< sppMinPoolCost ppup
402
- ]
403
- n = fromIntegral $ length l
404
- in encodeMapLen n <> fold l
405
- where
406
- encodeMapElement i encoder x = SJust (encodeWord i <> encoder x)
407
-
408
349
instance Era era => DecCBOR (ShelleyPParams StrictMaybe era ) where
409
350
decCBOR = do
410
351
mapParts <-
@@ -434,9 +375,6 @@ instance Era era => DecCBOR (ShelleyPParams StrictMaybe era) where
434
375
(fail $ " duplicate keys: " <> show fields)
435
376
pure $ foldr ($) emptyShelleyPParamsUpdate (snd <$> mapParts)
436
377
437
- instance Era era => ToCBOR (ShelleyPParams StrictMaybe era ) where
438
- toCBOR = toEraCBOR @ era
439
-
440
378
instance Era era => FromCBOR (ShelleyPParams StrictMaybe era ) where
441
379
fromCBOR = fromEraCBOR @ era
442
380
0 commit comments