Skip to content

Commit

Permalink
PlutusV2 -> PlutusV3
Browse files Browse the repository at this point in the history
  • Loading branch information
locallycompact committed Jul 23, 2024
1 parent 0989024 commit f88a249
Show file tree
Hide file tree
Showing 10 changed files with 621 additions and 216 deletions.
16 changes: 8 additions & 8 deletions hydra-cardano-api/src/Hydra/Cardano/Api.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
-- also get rid of era witnesses.
--
-- NOTE: This module also uses the **latest plutus version** available
-- (currently 'PlutusScriptV2'). So make sure that you give it a plutus script
-- (currently 'PlutusScriptV3'). So make sure that you give it a plutus script
-- of the right version (e.g. when compiling and serializing plutus-tx).
module Hydra.Cardano.Api (
-- * Common type-alias
Expand Down Expand Up @@ -230,7 +230,7 @@ pattern ShelleyKeyWitness{shelleyKeyWitness} <-

-- ** PlutusScript

type PlutusScript = Cardano.Api.PlutusScript PlutusScriptV2
type PlutusScript = Cardano.Api.PlutusScript PlutusScriptV3
{-# COMPLETE PlutusScriptSerialised #-}

pattern PlutusScriptSerialised :: ShortByteString -> PlutusScript
Expand All @@ -242,31 +242,31 @@ pattern PlutusScriptSerialised{plutusScriptSerialised} <-

-- ** Script

type Script = Cardano.Api.Script PlutusScriptV2
type Script = Cardano.Api.Script PlutusScriptV3
{-# COMPLETE PlutusScript #-}

pattern PlutusScript :: PlutusScript -> Script
pattern PlutusScript{plutusScript} <-
Cardano.Api.Shelley.PlutusScript _ plutusScript
where
PlutusScript =
Cardano.Api.Shelley.PlutusScript PlutusScriptV2
Cardano.Api.Shelley.PlutusScript PlutusScriptV3

-- ** ScriptInEra

type ScriptInEra = Cardano.Api.ScriptInEra Era

-- ** ScriptLanguage

type ScriptLanguage = Cardano.Api.ScriptLanguage PlutusScriptV2
type ScriptLanguage = Cardano.Api.ScriptLanguage PlutusScriptV3
{-# COMPLETE PlutusScriptLanguage #-}

pattern PlutusScriptLanguage :: ScriptLanguage
pattern PlutusScriptLanguage <-
Cardano.Api.Shelley.PlutusScriptLanguage _
where
PlutusScriptLanguage =
Cardano.Api.Shelley.PlutusScriptLanguage PlutusScriptV2
Cardano.Api.Shelley.PlutusScriptLanguage PlutusScriptV3

-- ** ScriptWitness

Expand All @@ -287,7 +287,7 @@ pattern PlutusScriptWitness
} <-
Cardano.Api.PlutusScriptWitness
_
PlutusScriptV2
PlutusScriptV3
(PScript plutusScriptWitnessScript)
plutusScriptWitnessDatum
plutusScriptWitnessRedeemer
Expand All @@ -296,7 +296,7 @@ pattern PlutusScriptWitness
PlutusScriptWitness =
Cardano.Api.PlutusScriptWitness
scriptLanguageInEra
PlutusScriptV2
PlutusScriptV3
. PScript

-- ** Tx
Expand Down
255 changes: 254 additions & 1 deletion hydra-cluster/config/protocol-parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,260 @@
38887044,
32947,
10
]
],
"PlutusV3": [
100788,
420,
1,
1,
1000,
173,
0,
1,
1000,
59957,
4,
1,
11183,
32,
201305,
8356,
4,
16000,
100,
16000,
100,
16000,
100,
16000,
100,
16000,
100,
16000,
100,
100,
100,
16000,
100,
94375,
32,
132994,
32,
61462,
4,
72010,
178,
0,
1,
22151,
32,
91189,
769,
4,
2,
85848,
123203,
7305,
-900,
1716,
549,
57,
85848,
0,
1,
1,
1000,
42921,
4,
2,
24548,
29498,
38,
1,
898148,
27279,
1,
51775,
558,
1,
39184,
1000,
60594,
1,
141895,
32,
83150,
32,
15299,
32,
76049,
1,
13169,
4,
22100,
10,
28999,
74,
1,
28999,
74,
1,
43285,
552,
1,
44749,
541,
1,
33852,
32,
68246,
32,
72362,
32,
7243,
32,
7391,
32,
11546,
32,
85848,
123203,
7305,
-900,
1716,
549,
57,
85848,
0,
1,
90434,
519,
0,
1,
74433,
32,
85848,
123203,
7305,
-900,
1716,
549,
57,
85848,
0,
1,
1,
85848,
123203,
7305,
-900,
1716,
549,
57,
85848,
0,
1,
955506,
213312,
0,
2,
270652,
22588,
4,
1457325,
64566,
4,
20467,
1,
4,
0,
141992,
32,
100788,
420,
1,
1,
81663,
32,
59498,
32,
20142,
32,
24588,
32,
20744,
32,
25933,
32,
24623,
32,
43053543,
10,
53384111,
14333,
10,
43574283,
26308,
10,
16000,
100,
16000,
100,
962335,
18,
2780678,
6,
442008,
1,
52538055,
3756,
18,
267929,
18,
76433006,
8868,
18,
52948122,
18,
1995836,
36,
3227919,
12,
901022,
1,
166917843,
4307,
36,
284546,
36,
158221314,
26549,
36,
74698472,
36,
333849714,
1,
254006273,
72,
2174038,
72,
2261318,
64571,
4,
207616,
8310,
4,
1293828,
28716,
63,
0,
1,
1006041,
43623,
251,
0,
1
]
},
"maxBlockBodySize": 90112,
"maxBlockExecutionUnits": {
Expand Down
Loading

0 comments on commit f88a249

Please sign in to comment.