File tree Expand file tree Collapse file tree 5 files changed +10
-6
lines changed
cardano-api/src/Cardano/Api Expand file tree Collapse file tree 5 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ import Cardano.Binary
2929import Cardano.Crypto.Hash.Blake2b qualified as Blake2b
3030import Cardano.Crypto.Hash.Class qualified as C
3131import Cardano.Crypto.VRF qualified as C
32- import Cardano.Ledger.Allegra.Scripts qualified as L
3332import Cardano.Ledger.Alonzo.Plutus.Context qualified as Plutus
3433import Cardano.Ledger.Alonzo.Scripts qualified as L
3534import Cardano.Ledger.Alonzo.Tx qualified as L
@@ -107,7 +106,6 @@ type AlonzoEraOnwardsConstraints era =
107106 , L. EraUTxO (ShelleyLedgerEra era )
108107 , L. HashAnnotated (L. TxBody (ShelleyLedgerEra era )) L. EraIndependentTxBody
109108 , L. MaryEraTxBody (ShelleyLedgerEra era )
110- , L. NativeScript (ShelleyLedgerEra era ) ~ L. Timelock (ShelleyLedgerEra era )
111109 , Plutus. EraPlutusContext (ShelleyLedgerEra era )
112110 , L. Script (ShelleyLedgerEra era ) ~ L. AlonzoScript (ShelleyLedgerEra era )
113111 , L. ScriptsNeeded (ShelleyLedgerEra era ) ~ L. AlonzoScriptsNeeded (ShelleyLedgerEra era )
Original file line number Diff line number Diff line change @@ -311,7 +311,6 @@ type EraCommonConstraints era =
311311 , L. EraUTxO (LedgerEra era )
312312 , L. Value (LedgerEra era ) ~ L. MaryValue
313313 , FromCBOR (ChainDepState (ConsensusProtocol era ))
314- , L. NativeScript (LedgerEra era ) ~ L. Timelock (LedgerEra era )
315314 , PraosProtocolSupportsNode (ConsensusProtocol era )
316315 , ShelleyLedgerEra era ~ LedgerEra era
317316 , ToJSON (ChainDepState (ConsensusProtocol era ))
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ import Cardano.Binary qualified as CBOR
3737import Cardano.Ledger.Alonzo.Scripts qualified as L
3838import Cardano.Ledger.BaseTypes (Version )
3939import Cardano.Ledger.Core qualified as L
40+ import Cardano.Ledger.Dijkstra.Scripts (upgradeTimelock )
4041import Cardano.Ledger.Plutus.Language qualified as L
4142
4243import Data.Text qualified as Text
@@ -96,7 +97,12 @@ convertToNewScriptWitness eon (Old.SimpleScriptWitness _ scriptOrRefInput) witne
9697
9798convertTotimelock
9899 :: AlonzoEraOnwards era -> Old. SimpleScript -> L. NativeScript (ShelleyLedgerEra era )
99- convertTotimelock eon s = alonzoEraOnwardsConstraints eon $ Old. toAllegraTimelock s
100+ convertTotimelock eon s =
101+ case eon of
102+ AlonzoEraOnwardsAlonzo -> alonzoEraOnwardsConstraints eon $ Old. toAllegraTimelock s
103+ AlonzoEraOnwardsBabbage -> alonzoEraOnwardsConstraints eon $ Old. toAllegraTimelock s
104+ AlonzoEraOnwardsConway -> alonzoEraOnwardsConstraints eon $ Old. toAllegraTimelock s
105+ AlonzoEraOnwardsDijkstra -> upgradeTimelock $ alonzoEraOnwardsConstraints AlonzoEraOnwardsConway $ Old. toAllegraTimelock s
100106
101107createPlutusScriptDatum
102108 :: Witnessable thing era
Original file line number Diff line number Diff line change @@ -2286,7 +2286,7 @@ getLedgerTablesUTxOValues sbe tbs =
22862286 -> Map TxIn (TxOut CtxUTxO era )
22872287 ejectTables idx =
22882288 let Consensus. LedgerTables (Ledger. ValuesMK values) = HFC. ejectLedgerTables idx tbs
2289- in Map. mapKeys fromShelleyTxIn $ Map. map (fromShelleyTxOut sbe) values
2289+ in Map. mapKeys ( fromShelleyTxIn . Shelley. getOriginalTxIn) $ Map. map (fromShelleyTxOut sbe) values
22902290 in
22912291 case sbe of
22922292 ShelleyBasedEraShelley -> ejectTables (IS IZ )
Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ import Cardano.Ledger.BaseTypes (StrictMaybe (..))
147147import Cardano.Ledger.Binary qualified as Binary (decCBOR , decodeFullAnnotator )
148148import Cardano.Ledger.Conway.Scripts qualified as Conway
149149import Cardano.Ledger.Core qualified as Ledger
150+ import Cardano.Ledger.Dijkstra.Scripts (upgradeTimelock )
150151import Cardano.Ledger.Dijkstra.Scripts qualified as Dijkstra
151152import Cardano.Ledger.Keys qualified as Shelley
152153import Cardano.Ledger.Plutus.Language qualified as Plutus
@@ -1242,7 +1243,7 @@ toShelleyScript (ScriptInEra langInEra (SimpleScript script)) =
12421243 SimpleScriptInAlonzo -> Alonzo. NativeScript (toAllegraTimelock script)
12431244 SimpleScriptInBabbage -> Alonzo. NativeScript (toAllegraTimelock script)
12441245 SimpleScriptInConway -> Alonzo. NativeScript (toAllegraTimelock script)
1245- SimpleScriptInDijkstra -> Alonzo. NativeScript (toAllegraTimelock script)
1246+ SimpleScriptInDijkstra -> Alonzo. NativeScript (upgradeTimelock $ toAllegraTimelock script)
12461247toShelleyScript
12471248 ( ScriptInEra
12481249 langInEra
You can’t perform that action at this time.
0 commit comments