Skip to content

Commit d5065ea

Browse files
committed
CDDL: Make plutus_v2_script era generic
1 parent 2d04e83 commit d5065ea

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

eras/babbage/impl/cddl/lib/Cardano/Ledger/Babbage/HuddleSpec.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
{-# LANGUAGE QuasiQuotes #-}
1010
{-# LANGUAGE ScopedTypeVariables #-}
1111
{-# LANGUAGE TypeApplications #-}
12+
{-# LANGUAGE UndecidableInstances #-}
1213
{-# OPTIONS_GHC -Wno-orphans #-}
1314

1415
module Cardano.Ledger.Babbage.HuddleSpec (
@@ -451,7 +452,7 @@ instance HuddleGroup "script_invalid_before" BabbageEra where
451452
instance HuddleGroup "script_invalid_hereafter" BabbageEra where
452453
huddleGroup = scriptInvalidHereafterGroup @BabbageEra
453454

454-
instance HuddleRule "plutus_v2_script" BabbageEra where
455+
instance (Era era, HuddleRule "distinct_bytes" era) => HuddleRule "plutus_v2_script" era where
455456
huddleRule p =
456457
comment
457458
[str|Babbage introduces Plutus V2 with improved cost model

eras/conway/impl/cddl/lib/Cardano/Ledger/Conway/HuddleSpec.hs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -636,14 +636,6 @@ instance HuddleRule "operational_cert" ConwayEra where
636636
instance HuddleRule "protocol_version" ConwayEra where
637637
huddleRule = babbageProtocolVersionRule @ConwayEra
638638

639-
instance HuddleRule "plutus_v2_script" ConwayEra where
640-
huddleRule p =
641-
comment
642-
[str|Babbage introduces Plutus V2 with improved cost model
643-
|and additional builtins.
644-
|]
645-
$ "plutus_v2_script" =:= huddleRule @"distinct_bytes" p
646-
647639
instance HuddleRule "plutus_v3_script" ConwayEra where
648640
huddleRule p =
649641
comment

0 commit comments

Comments
 (0)