Implement isGovernorDatumValid tests.
This commit is contained in:
parent
ff4619dd94
commit
740e1416fb
5 changed files with 116 additions and 136 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -579,6 +579,8 @@ newtype PProposalThresholds (s :: S) = PProposalThresholds
|
|||
PIsData
|
||||
, -- | @since 0.1.0
|
||||
PDataFields
|
||||
, -- | @since 0.2.1
|
||||
PShow
|
||||
)
|
||||
|
||||
-- | @since 0.2.0
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue