Exemple #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);
        }