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 039fa36620
commit 70d3c01af4
No known key found for this signature in database
GPG key ID: 1C4711FFF64C0254
8 changed files with 626 additions and 35 deletions

View file

@ -70,7 +70,6 @@ import Agora.Stake (
import Sample.Shared (
authorityTokenSymbol,
defaultProposalThresholds,
govAssetClass,
govSymbol,
govValidatorAddress,
@ -119,7 +118,7 @@ mintGST =
governorOutputDatum' :: GovernorDatum
governorOutputDatum' =
GovernorDatum
{ proposalThresholds = defaultProposalThresholds
{ proposalThresholds = def
, nextProposalId = ProposalId 0
, proposalTimings = def
, createProposalTimeRangeMaxWidth = def
@ -214,7 +213,7 @@ createProposal =
governorInputDatum' :: GovernorDatum
governorInputDatum' =
GovernorDatum
{ proposalThresholds = defaultProposalThresholds
{ proposalThresholds = def
, nextProposalId = thisProposalId
, proposalTimings = def
, createProposalTimeRangeMaxWidth = def
@ -245,7 +244,7 @@ createProposal =
, effects = effects
, status = Draft
, cosigners = [signer]
, thresholds = defaultProposalThresholds
, thresholds = def
, votes = emptyVotesFor effects
, timingConfig = def
, startingTime = proposalStartingTimeFromTimeRange validTimeRange
@ -392,7 +391,7 @@ mintGATs =
governorInputDatum' :: GovernorDatum
governorInputDatum' =
GovernorDatum
{ proposalThresholds = defaultProposalThresholds
{ proposalThresholds = def
, nextProposalId = ProposalId 5
, proposalTimings = def
, createProposalTimeRangeMaxWidth = def
@ -428,7 +427,7 @@ mintGATs =
, effects = effects
, status = Locked
, cosigners = [signer, signer2]
, thresholds = defaultProposalThresholds
, thresholds = def
, votes = proposalVotes
, timingConfig = def
, startingTime = ProposalStartingTime 10
@ -587,7 +586,7 @@ mutateState =
governorInputDatum' :: GovernorDatum
governorInputDatum' =
GovernorDatum
{ proposalThresholds = defaultProposalThresholds
{ proposalThresholds = def
, nextProposalId = ProposalId 5
, proposalTimings = def
, createProposalTimeRangeMaxWidth = def