Implement isGovernorDatumValid tests.

This commit is contained in:
adamczykm 2022-11-10 15:27:22 +01:00 committed by Hongrui Fang
parent ff4619dd94
commit 740e1416fb
5 changed files with 116 additions and 136 deletions

View file

@ -56,6 +56,7 @@ import "liqwid-plutarch-extra" Plutarch.Extra.TermCont (pletFieldsC)
import Plutarch.Lift (PConstantDecl, PUnsafeLiftDecl (PLifted))
import PlutusLedgerApi.V1 (TxOutRef)
import PlutusTx qualified
import Optics.TH (makeFieldLabelsNoPrefix)
--------------------------------------------------------------------------------
@ -84,6 +85,10 @@ data GovernorDatum = GovernorDatum
Generic
)
-- | @since 0.2.1
makeFieldLabelsNoPrefix ''GovernorDatum
-- | @since 0.1.0
PlutusTx.makeIsDataIndexed ''GovernorDatum [('GovernorDatum, 0)]
@ -181,6 +186,8 @@ newtype PGovernorDatum (s :: S) = PGovernorDatum
PDataFields
, -- | @since 0.1.0
PEq
, -- | @since 0.2.1
PShow
)
-- | @since 0.2.0

View file

@ -579,6 +579,8 @@ newtype PProposalThresholds (s :: S) = PProposalThresholds
PIsData
, -- | @since 0.1.0
PDataFields
, -- | @since 0.2.1
PShow
)
-- | @since 0.2.0

View file

@ -224,6 +224,8 @@ newtype PProposalTimingConfig (s :: S) = PProposalTimingConfig
PIsData
, -- | @since 0.1.0
PDataFields
, -- | @since 0.2.1
PShow
)
instance DerivePlutusType PProposalTimingConfig where
@ -260,6 +262,8 @@ newtype PMaxTimeRangeWidth (s :: S)
PPartialOrd
, -- | @since 0.1.0
POrd
, -- | @since 0.2.1
PShow
)
instance DerivePlutusType PMaxTimeRangeWidth where