-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
196 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
cardano-api/internal/Cardano/Api/LedgerEvents/Rule/DELEGS.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{-# LANGUAGE DataKinds #-} | ||
{-# LANGUAGE TypeFamilies #-} | ||
|
||
module Cardano.Api.LedgerEvents.Rule.DELEGS | ||
( handleShelleyDELEGSEvent | ||
) where | ||
|
||
import Cardano.Api.LedgerEvents.Rule.Types | ||
|
||
import qualified Cardano.Ledger.Shelley.Rules as Shelley | ||
|
||
handleShelleyDELEGSEvent :: Shelley.ShelleyDelegsEvent ledgerera -> Maybe LedgerEvent | ||
handleShelleyDELEGSEvent _ = Nothing |
29 changes: 29 additions & 0 deletions
29
cardano-api/internal/Cardano/Api/LedgerEvents/Rule/LEDGER.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{-# LANGUAGE DataKinds #-} | ||
{-# LANGUAGE TypeFamilies #-} | ||
|
||
module Cardano.Api.LedgerEvents.Rule.LEDGER | ||
( handleShelleyLEDGEREvents | ||
) where | ||
|
||
import Cardano.Api.LedgerEvents.Rule.DELEGS | ||
import Cardano.Api.LedgerEvents.Rule.Types | ||
import Cardano.Api.LedgerEvents.Rule.UTXOW | ||
|
||
import Cardano.Ledger.Alonzo.Rules (AlonzoUtxoEvent (..), AlonzoUtxosEvent (..), | ||
AlonzoUtxowEvent (..)) | ||
import qualified Cardano.Ledger.Core as Ledger.Core | ||
import qualified Cardano.Ledger.Shelley.Rules as Shelley | ||
|
||
import Control.State.Transition.Extended | ||
|
||
|
||
handleShelleyLEDGEREvents | ||
:: Event (Ledger.Core.EraRule "UTXOW" ledgerera) ~ AlonzoUtxowEvent ledgerera | ||
=> Event (Ledger.Core.EraRule "UTXO" ledgerera) ~ AlonzoUtxoEvent ledgerera | ||
=> Event (Ledger.Core.EraRule "UTXOS" ledgerera) ~ AlonzoUtxosEvent ledgerera | ||
=> Event (Ledger.Core.EraRule "DELEGS" ledgerera) ~ Shelley.ShelleyDelegsEvent ledgerera | ||
=> Shelley.ShelleyLedgerEvent ledgerera -> Maybe LedgerEvent | ||
handleShelleyLEDGEREvents ledgerEvent = | ||
case ledgerEvent of | ||
Shelley.UtxowEvent e -> handleAlonzoOnwardsUTxOWEvent e | ||
Shelley.DelegsEvent e -> handleShelleyDELEGSEvent e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.