I am following a tutorial from Dapp University about building Election Smart Contract. When I run this command in the console:
app.vote(1, {from: web3.eth.accounts[0] })
I get the following error:
Thrown: <Error: The send transaction "from" field must be defined!
I know that "web3.eth.accounts" has been depreciated and I have tried a few ways to solve it but so far no luck.