some doc for the proposal voting sample

This commit is contained in:
fanghr 2022-05-19 17:10:33 +08:00
parent dfe4bba15f
commit 3f5707eb86
No known key found for this signature in database
GPG key ID: 35CD9A71CD5D5870
2 changed files with 35 additions and 11 deletions

View file

@ -122,7 +122,15 @@ tests =
}
)
(Vote (ResultTag 0))
(ScriptContext (Proposal.voteOnProposal (ResultTag 0) 27) (Spending Proposal.proposalRef))
( ScriptContext
( Proposal.voteOnProposal
Proposal.VotingParameters
{ Proposal.voteFor = ResultTag 0
, Proposal.voteCount = 27
}
)
(Spending Proposal.proposalRef)
)
, validatorSucceedsWith
"stake"
(stakeValidator Shared.stake)
@ -134,7 +142,15 @@ tests =
]
)
(PermitVote $ ProposalLock (ResultTag 0) (ProposalId 42))
(ScriptContext (Proposal.voteOnProposal (ResultTag 0) 27) (Spending Proposal.stakeRef))
( ScriptContext
( Proposal.voteOnProposal
Proposal.VotingParameters
{ Proposal.voteFor = ResultTag 0
, Proposal.voteCount = 27
}
)
(Spending Proposal.stakeRef)
)
]
]
]