0

I am making a transaction using the function,

simple.multiply.sendTransaction(5,6{from:"0xcf03e41ee1116bed4f1acf8a2209b4d37d755988"})

This is a simple function which multiplies the two numbers 5 & 6. The value returned should be 30. But I am not able to see the result of this function anywhere.

All I have is the hash of the transaction with me which is:

"0x2c5f34dadb8929e891f96e6082cc0403043b60493d4a44114973655ec67bd87e"

Does geth have any method by which I can access the output. Are these output logs stored anywhere?

1

Because you're supposed to make a call instead of a transaction when calling function that do not modify the blockchain.

The return value of a call is the return value of the function.

The return value of a transaction is the transaction hash.

  • Isn't there a method in which I can check the value of the function using a transaction? – Akhil Kintali Mar 19 '18 at 8:51
  • 1
    No, because by definition you need to wait for the transaction to be mined before receiving the return value. It should not and can't be used that way. Plus calls are free, transactions are not. – Betcheg Mar 19 '18 at 8:53

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.