2

I am trying the sample voting contract given in the Solidity docs https://solidity.readthedocs.io/en/latest/solidity-by-example.html.

I managed to deploy the voting contract to the blockchain.

Once the contract is deployed, how do I access the different methods of the contract later from web3?

The functionality I need is:

  • new user signs up to a service
  • address of this new user should get added to the list of voters using the giveRightToVote method in the contract
  • After a fixed time,all the voters should cast their votes using the vote method
  • Get the results of the voting using winningProposal method

How do I achieve this functionality using just the contract address in web3?

3

0

Browse other questions tagged or ask your own question.