add tests and samples of advancing proposals

This commit is contained in:
fanghr 2022-05-28 22:11:23 +08:00 committed by Hongrui Fang
parent 9e8424b458
commit 042c18a382
8 changed files with 626 additions and 35 deletions

View file

@ -45,7 +45,6 @@ import Plutus.V1.Ledger.Value qualified as Value
import Sample.Shared (
authorityTokenSymbol,
defaultProposalThresholds,
govAssetClass,
govValidatorAddress,
governor,
@ -113,7 +112,7 @@ mkEffectTxInfo newGovDatum =
governorInputDatum' :: GovernorDatum
governorInputDatum' =
GovernorDatum
{ proposalThresholds = defaultProposalThresholds
{ proposalThresholds = def
, nextProposalId = ProposalId 0
, proposalTimings = def
, createProposalTimeRangeMaxWidth = def
@ -175,7 +174,7 @@ mkEffectTxInfo newGovDatum =
validNewGovernorDatum :: GovernorDatum
validNewGovernorDatum =
GovernorDatum
{ proposalThresholds = defaultProposalThresholds
{ proposalThresholds = def
, nextProposalId = ProposalId 42
, proposalTimings = def
, createProposalTimeRangeMaxWidth = def
@ -185,7 +184,7 @@ invalidNewGovernorDatum :: GovernorDatum
invalidNewGovernorDatum =
GovernorDatum
{ proposalThresholds =
defaultProposalThresholds
def
{ countVoting = Tagged (-1)
}
, nextProposalId = ProposalId 42