Esempio n. 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);
        }
Esempio n. 2
0
 public Task <TransactionReceipt> ResponsibleVoteRequestAndWaitForReceiptAsync(ResponsibleVoteFunction responsibleVoteFunction, CancellationTokenSource cancellationToken = null)
 {
     return(ContractHandler.SendRequestAndWaitForReceiptAsync(responsibleVoteFunction, cancellationToken));
 }
Esempio n. 3
0
 public Task <string> ResponsibleVoteRequestAsync(ResponsibleVoteFunction responsibleVoteFunction)
 {
     return(ContractHandler.SendRequestAsync(responsibleVoteFunction));
 }