@@ -81,14 +81,8 @@ import Cardano.Ledger.Shelley.Era (ShelleyEra)
81
81
import Cardano.Ledger.Slot (EpochNo (.. ), SlotNo (.. ))
82
82
import Control.DeepSeq (NFData )
83
83
import Data.Aeson (
84
- FromJSON (.. ),
85
84
Key ,
86
- KeyValue ,
87
85
ToJSON (.. ),
88
- object ,
89
- pairs ,
90
- (.:) ,
91
- (.=) ,
92
86
)
93
87
import qualified Data.Aeson as Aeson
94
88
import Data.Functor.Identity (Identity )
@@ -199,49 +193,6 @@ instance EraPParams ShelleyEra where
199
193
200
194
eraPParams = shelleyPParams
201
195
202
- instance
203
- ( EraPParams era
204
- , PParamsHKD Identity era ~ ShelleyPParams Identity era
205
- , ProtVerAtMost era 4
206
- , ProtVerAtMost era 6
207
- , ProtVerAtMost era 8
208
- ) =>
209
- ToJSON (ShelleyPParams Identity era )
210
- where
211
- toJSON = object . shelleyPParamsPairs
212
- toEncoding = pairs . mconcat . shelleyPParamsPairs
213
-
214
- shelleyPParamsPairs ::
215
- forall era a e .
216
- (EraPParams era , ProtVerAtMost era 4 , ProtVerAtMost era 6 , ProtVerAtMost era 8 , KeyValue e a ) =>
217
- PParamsHKD Identity era ->
218
- [a ]
219
- shelleyPParamsPairs pp =
220
- uncurry (.=)
221
- <$> shelleyPParamsHKDPairs (Proxy @ Identity ) pp
222
-
223
- instance FromJSON (ShelleyPParams Identity era ) where
224
- parseJSON =
225
- Aeson. withObject " ShelleyPParams" $ \ obj -> do
226
- ShelleyPParams
227
- <$> obj .: " txFeePerByte"
228
- <*> obj .: " txFeeFixed"
229
- <*> obj .: " maxBlockBodySize"
230
- <*> obj .: " maxTxSize"
231
- <*> obj .: " maxBlockHeaderSize"
232
- <*> obj .: " stakeAddressDeposit"
233
- <*> obj .: " stakePoolDeposit"
234
- <*> obj .: " poolRetireMaxEpoch"
235
- <*> obj .: " stakePoolTargetNum"
236
- <*> obj .: " poolPledgeInfluence"
237
- <*> obj .: " monetaryExpansion"
238
- <*> obj .: " treasuryCut"
239
- <*> obj .: " decentralization"
240
- <*> obj .: " extraPraosEntropy"
241
- <*> obj .: " protocolVersion"
242
- <*> obj .: " minUTxOValue"
243
- <*> obj .: " minPoolCost"
244
-
245
196
emptyShelleyPParams :: forall era . Era era => ShelleyPParams Identity era
246
197
emptyShelleyPParams =
247
198
ShelleyPParams
@@ -316,40 +267,6 @@ instance NoThunks PPUpdateEnv
316
267
317
268
{-# DEPRECATED PPUpdateEnv "As unused" #-}
318
269
319
- instance
320
- ( EraPParams era
321
- , PParamsHKD StrictMaybe era ~ ShelleyPParams StrictMaybe era
322
- , ProtVerAtMost era 4
323
- , ProtVerAtMost era 6
324
- , ProtVerAtMost era 8
325
- ) =>
326
- ToJSON (ShelleyPParams StrictMaybe era )
327
- where
328
- toJSON = object . shelleyPParamsUpdatePairs
329
- toEncoding = pairs . mconcat . shelleyPParamsUpdatePairs
330
-
331
- shelleyPParamsUpdatePairs ::
332
- forall era a e .
333
- (EraPParams era , ProtVerAtMost era 4 , ProtVerAtMost era 6 , ProtVerAtMost era 8 , KeyValue e a ) =>
334
- PParamsHKD StrictMaybe era ->
335
- [a ]
336
- shelleyPParamsUpdatePairs pp =
337
- [ k .= v
338
- | (k, SJust v) <- shelleyPParamsHKDPairs (Proxy @ StrictMaybe ) pp
339
- ]
340
-
341
- shelleyPParamsHKDPairs ::
342
- forall f era .
343
- (HKDFunctor f , EraPParams era , ProtVerAtMost era 4 , ProtVerAtMost era 6 , ProtVerAtMost era 8 ) =>
344
- Proxy f ->
345
- PParamsHKD f era ->
346
- [(Key , HKD f Aeson. Value )]
347
- shelleyPParamsHKDPairs px pp =
348
- shelleyCommonPParamsHKDPairs px pp
349
- ++ shelleyCommonPParamsHKDPairsV6 px pp
350
- ++ shelleyCommonPParamsHKDPairsV8 px pp
351
- ++ [(" minUTxOValue" , hkdMap px (toJSON @ Coin ) (pp ^. hkdMinUTxOValueL @ era @ f ))]
352
-
353
270
-- | These are the fields that are common only up to major protocol version 6
354
271
shelleyCommonPParamsHKDPairsV6 ::
355
272
forall f era .
0 commit comments