Let's say there's a payable Solidity function
function doSomething()
payable
returns(uint)
{
require(msg.value == 1 ether);
return 1;
}
And you call this function
instance.doSomething({
from:_account,
value:1 ether
}).then(function(value) {
}).catch(function(err) {
});
This will send ether to the function, make transaction and will return the transaction result. Cool.
But how can I get the return value of that Solidity function? Transaction record does not have anything about it.
'instance.doSomething.sendTransaction()' also the same situation.
Because the function is payable, it should receive ethereum.
Many thanks, coindevbw