Skip to content

Commit

Permalink
re-export Plutus' validateCostModelParams
Browse files Browse the repository at this point in the history
  • Loading branch information
Jared Corduan committed May 14, 2021
1 parent 02aff33 commit a39418c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions alonzo/impl/src/Cardano/Ledger/Alonzo/Scripts.hs
Expand Up @@ -33,6 +33,7 @@ module Cardano.Ledger.Alonzo.Scripts
alwaysSucceeds,
alwaysFails,
pointWiseExUnits,
validateCostModelParams,
)
where

Expand Down Expand Up @@ -70,7 +71,7 @@ import Data.Word (Word64, Word8)
import GHC.Generics (Generic)
import NoThunks.Class (InspectHeapNamed (..), NoThunks)
import Numeric.Natural (Natural)
import qualified Plutus.V1.Ledger.Api as Plutus (validateCostModelParams)
import Plutus.V1.Ledger.Api (validateCostModelParams)
import qualified Plutus.V1.Ledger.Examples as Plutus (alwaysFailingNAryFunction, alwaysSucceedingNAryFunction)
import Shelley.Spec.Ledger.Serialization (mapFromCBOR)

Expand Down Expand Up @@ -170,7 +171,7 @@ deriving instance ToCBOR CostModel

checkCostModel :: Map Text Integer -> Either String CostModel
checkCostModel cm =
if Plutus.validateCostModelParams cm
if validateCostModelParams cm
then Right (CostModel cm)
else Left ("Invalid cost model: " ++ show cm)

Expand Down

0 comments on commit a39418c

Please sign in to comment.