예제 #1
0
 /// <summary>
 /// Creates a vote msg for active governance proposals
 /// </summary>
 /// <param name="voteOption">Vote option</param>
 /// <param name="proposal_id">Proposal ID to cast vote on</param>
 /// <param name="account_number">Account number and sequence must be provided together; when provided, overrides obtaining acc_num & seq from LCD API</param>
 /// <param name="sequence">Account number and sequence must be provided together; when provided, overrides obtaining acc_num & seq from LCD API</param>
 /// <param name="memo">Public memo for transaction</param>
 /// <param name="fee">Override default network fee for transaction</param>
 /// <param name="gas">Override default network gas for transaction</param>
 /// <returns></returns>
 public Msgs.Vote Vote(
     VoteOption voteOption, string proposal_id,
     string account_number = null, string sequence = null, string memo = null,
     string fee            = null, string gas = null)
 {
     return(new Msgs.Vote()
     {
         network = Network,
         msgType = MsgType.Vote,
         value = new Msgs.Vote.ValueParams()
         {
             option = voteOption.GetOption(),
             proposal_id = proposal_id,
             voter = Address
         },
         address = Address,
         account_number = account_number,
         sequence = sequence,
         memo = memo,
         fee = fee,
         gas = gas
     });
 }
예제 #2
0
파일: Vote.cs 프로젝트: dropil/NDrop
 public ValueParams(VoteOption voteOption, string proposal_id, string voter)
 {
     this.option      = voteOption.GetOption();
     this.proposal_id = proposal_id;
     this.voter       = voter;
 }