{-# LANGUAGE OverloadedLists #-}
module Cardano.Constitution.Validator
( module Export
, defaultValidators
, defaultValidatorsWithCodes
) where
import Cardano.Constitution.Validator.Common as Export
import Cardano.Constitution.Validator.Sorted qualified as S
import Cardano.Constitution.Validator.Unsorted qualified as U
import Data.Map.Strict qualified as M
import PlutusTx.Code
defaultValidatorsWithCodes :: M.Map String (ConstitutionValidator, CompiledCode ConstitutionValidator)
defaultValidatorsWithCodes :: Map
String (ConstitutionValidator, CompiledCode ConstitutionValidator)
defaultValidatorsWithCodes =
[ (String
"sorted", (ConstitutionValidator
S.defaultConstitutionValidator, CompiledCode ConstitutionValidator
S.defaultConstitutionCode))
, (String
"unsorted", (ConstitutionValidator
U.defaultConstitutionValidator, CompiledCode ConstitutionValidator
U.defaultConstitutionCode))
]
defaultValidators :: M.Map String ConstitutionValidator
defaultValidators :: Map String ConstitutionValidator
defaultValidators = ((ConstitutionValidator, CompiledCode ConstitutionValidator)
-> ConstitutionValidator)
-> Map
String (ConstitutionValidator, CompiledCode ConstitutionValidator)
-> Map String ConstitutionValidator
forall a b. (a -> b) -> Map String a -> Map String b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (ConstitutionValidator, CompiledCode ConstitutionValidator)
-> ConstitutionValidator
forall a b. (a, b) -> a
fst Map
String (ConstitutionValidator, CompiledCode ConstitutionValidator)
defaultValidatorsWithCodes