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

@ -33,7 +33,6 @@ module Sample.Shared (
gstUTXORef,
-- ** Proposal
defaultProposalThresholds,
proposal,
proposalPolicySymbol,
proposalValidatorHash,
@ -184,13 +183,16 @@ proposalValidatorHash = proposalValidatorHashFromGovernor governor
proposalValidatorAddress :: Address
proposalValidatorAddress = scriptHashAddress proposalValidatorHash
defaultProposalThresholds :: ProposalThresholds
defaultProposalThresholds =
ProposalThresholds
{ countVoting = Tagged 1000
, create = Tagged 1
, startVoting = Tagged 10
}
{- | Default value of 'Agora.Proposal.ProposalThresholds'.
For testing purpose only.
-}
instance Default ProposalThresholds where
def =
ProposalThresholds
{ countVoting = Tagged 1000
, create = Tagged 1
, startVoting = Tagged 10
}
authorityToken :: AuthorityToken
authorityToken = authorityTokenFromGovernor governor