0

I'm making some tests on web3.py and there is a thing I don't undertand. I have a contract like this:

contract Test {
function add(uint x, uint y) returns(uint){
    return x + y;
}

When i make a transaction on it using

transaction = eth.sendTransaction({"from": some_address, "to": address_of_the_contract_Test, "data": formated_data})

and parse the result using

eth.getTransactionReceipt(transaction)

it gives me a json-formated response without "output" attribute... Can someone tell me why?

(I know that there exist a call function to get the output but I want to do it using a transaction).

TylerH
  • 20,799
  • 66
  • 75
  • 101

1 Answers1

1

Transactions don't have return values. If you want to communicate something back to the client that sent the transaction, you'll probably want to log an event instead.

user94559
  • 59,196
  • 6
  • 103
  • 103