module Plutus.V2.Ledger.EvaluationContext
    ( module V1.EvaluationContext
    , costModelParamNames
    ) where

import Plutus.V1.Ledger.EvaluationContext as V1.EvaluationContext hiding (costModelParamNames)
import PlutusCore as Plutus (defaultCostModelParams)

import Data.Map qualified as Map
import Data.Maybe
import Data.Set qualified as Set
import Data.Text qualified as Text

-- | The set of valid names that a cost model parameter can take for this language version.
-- It is used for the deserialization of `CostModelParams`.
costModelParamNames :: Set.Set Text.Text
costModelParamNames :: Set Text
costModelParamNames = Map Text Integer -> Set Text
forall k a. Map k a -> Set k
Map.keysSet (Map Text Integer -> Set Text) -> Map Text Integer -> Set Text
forall a b. (a -> b) -> a -> b
$ Maybe (Map Text Integer) -> Map Text Integer
forall a. HasCallStack => Maybe a -> a
fromJust Maybe (Map Text Integer)
Plutus.defaultCostModelParams