|
12 | 12 | {-# LANGUAGE TypeFamilies #-}
|
13 | 13 | {-# LANGUAGE TypeOperators #-}
|
14 | 14 | {-# LANGUAGE UndecidableInstances #-}
|
| 15 | +{-# LANGUAGE UndecidableSuperClasses #-} |
15 | 16 | {-# OPTIONS_GHC -Wno-orphans #-}
|
16 | 17 |
|
17 | 18 | module Cardano.Ledger.Conway.TxInfo (
|
18 | 19 | ConwayContextError (..),
|
| 20 | + ConwayEraPlutusTxInfo (..), |
19 | 21 | transTxBodyWithdrawals,
|
20 | 22 | transTxCert,
|
21 | 23 | transDRepCred,
|
@@ -79,9 +81,6 @@ import Cardano.Ledger.Conway.Governance (
|
79 | 81 | VotingProcedures (..),
|
80 | 82 | unGovActionIx,
|
81 | 83 | )
|
82 |
| -import Cardano.Ledger.Conway.Plutus.Context ( |
83 |
| - ConwayEraPlutusTxInfo (toPlutusChangedParameters), |
84 |
| - ) |
85 | 84 | import Cardano.Ledger.Conway.Scripts (ConwayPlutusPurpose (..), PlutusScript (..))
|
86 | 85 | import Cardano.Ledger.Conway.Tx ()
|
87 | 86 | import Cardano.Ledger.Conway.TxCert
|
@@ -727,5 +726,13 @@ scriptPurposeToScriptInfo sp maybeSpendingData =
|
727 | 726 | PV3.Voting voter -> PV3.VotingScript voter
|
728 | 727 | PV3.Proposing ix proposal -> PV3.ProposingScript ix proposal
|
729 | 728 |
|
| 729 | +-- | A class to compute the changed parameters in the TxInfo |
| 730 | +-- given a ToPlutusData instance for PParamsUpdate |
| 731 | +class |
| 732 | + EraPlutusTxInfo l era => |
| 733 | + ConwayEraPlutusTxInfo (l :: Language) era |
| 734 | + where |
| 735 | + toPlutusChangedParameters :: proxy l -> PParamsUpdate era -> PV3.ChangedParameters |
| 736 | + |
730 | 737 | instance ConwayEraPlutusTxInfo 'PlutusV3 ConwayEra where
|
731 | 738 | toPlutusChangedParameters _ x = PV3.ChangedParameters (PV3.dataToBuiltinData (toPlutusData x))
|
0 commit comments