Skip to main content
replaced http://ethereum.stackexchange.com/ with https://ethereum.stackexchange.com/
Source Link

You need to specify constantconstant so that you get the return value of a call:

function get_from_map(uint _key) constant returns (address).

Without constant, test.get_from_map(1) is a sendTransaction which always returns a transaction hash. See What is the difference between a transaction and a call?What is the difference between a transaction and a call?

You need to specify constant so that you get the return value of a call:

function get_from_map(uint _key) constant returns (address).

Without constant, test.get_from_map(1) is a sendTransaction which always returns a transaction hash. See What is the difference between a transaction and a call?

You need to specify constant so that you get the return value of a call:

function get_from_map(uint _key) constant returns (address).

Without constant, test.get_from_map(1) is a sendTransaction which always returns a transaction hash. See What is the difference between a transaction and a call?

Source Link
eth
  • 86.5k
  • 53
  • 287
  • 411

You need to specify constant so that you get the return value of a call:

function get_from_map(uint _key) constant returns (address).

Without constant, test.get_from_map(1) is a sendTransaction which always returns a transaction hash. See What is the difference between a transaction and a call?