@@ -35,7 +35,6 @@ module Cardano.Ledger.Babbage.PParams (
35
35
encodeLangViews ,
36
36
coinsPerUTxOWordToCoinsPerUTxOByte ,
37
37
coinsPerUTxOByteToCoinsPerUTxOWord ,
38
- babbagePParamsHKDPairs ,
39
38
babbageCommonPParamsHKDPairs ,
40
39
ppCoinsPerUTxOByte ,
41
40
) where
@@ -72,13 +71,8 @@ import Control.DeepSeq (NFData)
72
71
import Data.Aeson as Aeson (
73
72
FromJSON (.. ),
74
73
Key ,
75
- KeyValue ((.=) ),
76
74
ToJSON (.. ),
77
75
Value ,
78
- object ,
79
- pairs ,
80
- withObject ,
81
- (.:) ,
82
76
)
83
77
import Data.Functor.Identity (Identity (.. ))
84
78
import Data.Proxy (Proxy (Proxy ))
@@ -273,48 +267,6 @@ instance EraGov BabbageEra where
273
267
274
268
obligationGovState = const mempty
275
269
276
- instance
277
- (PParamsHKD Identity era ~ BabbagePParams Identity era , BabbageEraPParams era , ProtVerAtMost era 8 ) =>
278
- ToJSON (BabbagePParams Identity era )
279
- where
280
- toJSON = object . babbagePParamsPairs
281
- toEncoding = pairs . mconcat . babbagePParamsPairs
282
-
283
- babbagePParamsPairs ::
284
- forall era a e .
285
- (BabbageEraPParams era , KeyValue e a , ProtVerAtMost era 8 ) =>
286
- PParamsHKD Identity era ->
287
- [a ]
288
- babbagePParamsPairs pp =
289
- uncurry (.=) <$> babbagePParamsHKDPairs (Proxy @ Identity ) pp
290
-
291
- instance FromJSON (BabbagePParams Identity era ) where
292
- parseJSON =
293
- withObject " PParams" $ \ obj ->
294
- BabbagePParams
295
- <$> obj .: " txFeePerByte"
296
- <*> obj .: " txFeeFixed"
297
- <*> obj .: " maxBlockBodySize"
298
- <*> obj .: " maxTxSize"
299
- <*> obj .: " maxBlockHeaderSize"
300
- <*> obj .: " stakeAddressDeposit"
301
- <*> obj .: " stakePoolDeposit"
302
- <*> obj .: " poolRetireMaxEpoch"
303
- <*> obj .: " stakePoolTargetNum"
304
- <*> obj .: " poolPledgeInfluence"
305
- <*> obj .: " monetaryExpansion"
306
- <*> obj .: " treasuryCut"
307
- <*> obj .: " protocolVersion"
308
- <*> obj .: " minPoolCost"
309
- <*> obj .: " utxoCostPerByte"
310
- <*> obj .: " costModels"
311
- <*> obj .: " executionUnitPrices"
312
- <*> obj .: " maxTxExecutionUnits"
313
- <*> obj .: " maxBlockExecutionUnits"
314
- <*> obj .: " maxValueSize"
315
- <*> obj .: " collateralPercentage"
316
- <*> obj .: " maxCollateralInputs"
317
-
318
270
-- | Returns a basic "empty" `PParams` structure with all zero values.
319
271
emptyBabbagePParams :: forall era . Era era => BabbagePParams Identity era
320
272
emptyBabbagePParams =
@@ -370,36 +322,6 @@ emptyBabbagePParamsUpdate =
370
322
, bppMaxCollateralInputs = SNothing
371
323
}
372
324
373
- instance
374
- ( PParamsHKD StrictMaybe era ~ BabbagePParams StrictMaybe era
375
- , BabbageEraPParams era
376
- , ProtVerAtMost era 8
377
- ) =>
378
- ToJSON (BabbagePParams StrictMaybe era )
379
- where
380
- toJSON = object . babbagePParamsUpdatePairs
381
- toEncoding = pairs . mconcat . babbagePParamsUpdatePairs
382
-
383
- babbagePParamsUpdatePairs ::
384
- forall era a e .
385
- (BabbageEraPParams era , KeyValue e a , ProtVerAtMost era 8 ) =>
386
- PParamsHKD StrictMaybe era ->
387
- [a ]
388
- babbagePParamsUpdatePairs pp =
389
- [ k .= v
390
- | (k, SJust v) <- babbagePParamsHKDPairs (Proxy @ StrictMaybe ) pp
391
- ]
392
-
393
- babbagePParamsHKDPairs ::
394
- forall era f .
395
- (BabbageEraPParams era , HKDFunctor f , ProtVerAtMost era 8 ) =>
396
- Proxy f ->
397
- PParamsHKD f era ->
398
- [(Key , HKD f Aeson. Value )]
399
- babbagePParamsHKDPairs px pp =
400
- babbageCommonPParamsHKDPairs px pp
401
- <> shelleyCommonPParamsHKDPairsV8 px pp -- for "protocolVersion"
402
-
403
325
-- | These are the fields that are common across all eras starting with Babbage.
404
326
babbageCommonPParamsHKDPairs ::
405
327
forall era f .
0 commit comments