|
1 | 1 | {-# LANGUAGE DataKinds #-} |
2 | 2 | {-# LANGUAGE FlexibleContexts #-} |
| 3 | +{-# LANGUAGE LambdaCase #-} |
3 | 4 | {-# LANGUAGE TypeFamilies #-} |
4 | 5 | {-# LANGUAGE TypeOperators #-} |
5 | 6 |
|
@@ -29,24 +30,26 @@ import Control.State.Transition.Extended |
29 | 30 |
|
30 | 31 | handleConwayUTxOWEvent |
31 | 32 | :: AlonzoUtxowEvent ConwayEra -> Maybe LedgerEvent |
32 | | -handleConwayUTxOWEvent (Alonzo.WrappedShelleyEraEvent (Shelley.UtxoEvent (Alonzo.UtxosEvent conwayUTxOsEvent))) = |
33 | | - case conwayUTxOsEvent of |
34 | | - Conway.TotalDeposits{} -> Nothing |
35 | | - Conway.SuccessfulPlutusScriptsEvent e -> Just $ SuccessfulPlutusScript e |
36 | | - Conway.FailedPlutusScriptsEvent e -> Just $ FailedPlutusScript e |
37 | | - Conway.TxUTxODiff _ _ -> Nothing |
| 33 | +handleConwayUTxOWEvent = \case |
| 34 | + (Alonzo.WrappedShelleyEraEvent (Shelley.UtxoEvent TotalDeposits{})) -> Nothing |
| 35 | + (Alonzo.WrappedShelleyEraEvent (Shelley.UtxoEvent TxUTxODiff{})) -> Nothing |
| 36 | + (Alonzo.WrappedShelleyEraEvent (Shelley.UtxoEvent (Alonzo.UtxosEvent conwayUTxOsEvent))) -> |
| 37 | + case conwayUTxOsEvent of |
| 38 | + Conway.SuccessfulPlutusScriptsEvent e -> Just $ SuccessfulPlutusScript e |
| 39 | + Conway.FailedPlutusScriptsEvent e -> Just $ FailedPlutusScript e |
38 | 40 |
|
39 | 41 | handleAlonzoUTxOWEvent |
40 | 42 | :: Event (Ledger.Core.EraRule "UTXO" ledgerera) ~ AlonzoUtxoEvent ledgerera |
41 | 43 | => Event (Ledger.Core.EraRule "UTXOS" ledgerera) ~ AlonzoUtxosEvent ledgerera |
42 | 44 | => AlonzoUtxowEvent ledgerera -> Maybe LedgerEvent |
43 | | -handleAlonzoUTxOWEvent (WrappedShelleyEraEvent (Shelley.UtxoEvent (UtxosEvent utxoEvent))) = |
44 | | - case utxoEvent of |
45 | | - Alonzo.AlonzoPpupToUtxosEvent{} -> Nothing |
46 | | - Alonzo.TotalDeposits{} -> Nothing |
47 | | - Alonzo.SuccessfulPlutusScriptsEvent e -> Just $ SuccessfulPlutusScript e |
48 | | - Alonzo.FailedPlutusScriptsEvent e -> Just $ FailedPlutusScript e |
49 | | - Alonzo.TxUTxODiff _ _ -> Nothing |
| 45 | +handleAlonzoUTxOWEvent = \case |
| 46 | + (Alonzo.WrappedShelleyEraEvent (Shelley.UtxoEvent TotalDeposits{})) -> Nothing |
| 47 | + (Alonzo.WrappedShelleyEraEvent (Shelley.UtxoEvent TxUTxODiff{})) -> Nothing |
| 48 | + (WrappedShelleyEraEvent (Shelley.UtxoEvent (UtxosEvent utxoEvent))) -> |
| 49 | + case utxoEvent of |
| 50 | + Alonzo.AlonzoPpupToUtxosEvent{} -> Nothing |
| 51 | + Alonzo.SuccessfulPlutusScriptsEvent e -> Just $ SuccessfulPlutusScript e |
| 52 | + Alonzo.FailedPlutusScriptsEvent e -> Just $ FailedPlutusScript e |
50 | 53 |
|
51 | 54 | handlePreAlonzoUTxOWEvent |
52 | 55 | :: Event (Ledger.Core.EraRule "UTXO" ledgerera) ~ Shelley.UtxoEvent ledgerera |
|
0 commit comments