I'm following the ethereum walkthrough at: https://hackernoon.com/ethereum-development-walkthrough-part-2-truffle-ganache-geth-and-mist-8d6320e12269

I got stuck at account0 = web3.eth.accounts[0]. The result would be "undefined". Also the result is undefined for Wrestling.deployed().then(inst => { WrestlingInstance = inst }).

The command WrestlingInstance.wrestler1.call() does return the first address.

I was able to set account0 using the lines: var account0;

web3.eth.getAccounts().then(e => {account0 = e[0]})

Now when I enter WrestlingInstance.registerAsAnOpponent({from: account1}) I get the error:

sender account not recognized

I expect truffle to return that a transaction has occurred.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.