コード例 #1
0
        internal async Task responsibleVoteAsync(string privateKey, bool accept, string voteInfo)
        {
            ResponsibleVoteFunction responsibleVoteFunction = new ResponsibleVoteFunction();

            responsibleVoteFunction.GitHash      = gitHashByte;
            responsibleVoteFunction.FromAddress  = Web3.GetAddressFromPrivateKey(privateKey);
            responsibleVoteFunction.AcceptChange = accept;
            responsibleVoteFunction.VoteInfo     = voteInfo;

            Web3 web3 = new Web3(new Account(privateKey));

            ChangeManagerService responsibleService = new ChangeManagerService(web3, this.contractAddress);

            responsibleVoteFunction.Gas = 500000;

            await responsibleService.ResponsibleVoteRequestAsync(responsibleVoteFunction);
        }
コード例 #2
0
 public Task <TransactionReceipt> ResponsibleVoteRequestAndWaitForReceiptAsync(ResponsibleVoteFunction responsibleVoteFunction, CancellationTokenSource cancellationToken = null)
 {
     return(ContractHandler.SendRequestAndWaitForReceiptAsync(responsibleVoteFunction, cancellationToken));
 }
コード例 #3
0
 public Task <string> ResponsibleVoteRequestAsync(ResponsibleVoteFunction responsibleVoteFunction)
 {
     return(ContractHandler.SendRequestAsync(responsibleVoteFunction));
 }