Skip to main content

Try setting

web3.eth.defaultAccount = accounts[0]eth.accounts[0]

It sounds like your transaction doesn't know what account to use to sign the call. Any call that changes the state of the contract (write operation) requires a signed transaction.

An alternative approach would be to pass a 'transaction object' as the last argument to contract method:

storage.set(10,{from: accounts[0]});

Edit 1:

When I chose the 'from' account, I got the following error: 'authentication needed: password or unlock'. So I needed to run personal.unlockAccount(eth.accounts[0],"password",15000). You can read about it at 'authentication needed: password or unlock' Error when trying to call smart contract method via web3 .

Try setting

web3.eth.defaultAccount = accounts[0]

It sounds like your transaction doesn't know what account to use to sign the call. Any call that changes the state of the contract (write operation) requires a signed transaction.

An alternative approach would be to pass a 'transaction object' as the last argument to contract method:

storage.set(10,{from: accounts[0]});

Try setting

web3.eth.defaultAccount = eth.accounts[0]

It sounds like your transaction doesn't know what account to use to sign the call. Any call that changes the state of the contract (write operation) requires a signed transaction.

An alternative approach would be to pass a 'transaction object' as the last argument to contract method:

storage.set(10,{from: accounts[0]});

Edit 1:

When I chose the 'from' account, I got the following error: 'authentication needed: password or unlock'. So I needed to run personal.unlockAccount(eth.accounts[0],"password",15000). You can read about it at 'authentication needed: password or unlock' Error when trying to call smart contract method via web3 .

added 1 character in body
Source Link
dbryson
  • 6.4k
  • 2
  • 27
  • 37

Try setting

web3.eth.defaultAccount = accounts[0]

It sounds like your transaction doesn't know what account to use to sign the call. Any callscall that changechanges the state of the contract (write callsoperation) requirerequires a signed transaction.

An alternative approach would be to pass a 'transaction object' as the last argument to contract method:

storage.set(10,{from: accounts[0]});

Try setting

web3.eth.defaultAccount = accounts[0]

It sounds like your transaction doesn't know what account to use to sign the call. Any calls that change the state of the contract (write calls) require a signed transaction.

An alternative approach would be to pass a 'transaction object' as the last argument to contract method:

storage.set(10,{from: accounts[0]});

Try setting

web3.eth.defaultAccount = accounts[0]

It sounds like your transaction doesn't know what account to use to sign the call. Any call that changes the state of the contract (write operation) requires a signed transaction.

An alternative approach would be to pass a 'transaction object' as the last argument to contract method:

storage.set(10,{from: accounts[0]});
added 94 characters in body
Source Link
dbryson
  • 6.4k
  • 2
  • 27
  • 37

Try setting

web3.eth.defaultAccount = accounts[0]

It sounds like your transaction doesn't know what account to use to sign the call. Any calls that change the state of the contract (write calls) require a signed transaction.

An alternative approach would be to pass a 'transaction object' as the last argument to contract method:

storage.set(10,{from: accounts[0]});

Try setting

web3.eth.defaultAccount = accounts[0]

It sounds like your transaction doesn't know what account to use to sign the call.

Try setting

web3.eth.defaultAccount = accounts[0]

It sounds like your transaction doesn't know what account to use to sign the call. Any calls that change the state of the contract (write calls) require a signed transaction.

An alternative approach would be to pass a 'transaction object' as the last argument to contract method:

storage.set(10,{from: accounts[0]});
Source Link
dbryson
  • 6.4k
  • 2
  • 27
  • 37
Loading