Here is my simple contract I've wrote in Remix and deployed with web3 generated code on my private dev-network.
contract test{ function say_hi() returns(string) { return "Hi"; } }
When I mined a little and run
test_sol_test
I get the following output:
{
abi: [{
constant: false,
inputs: [],
name: "say_hi",
outputs: [{...}],
payable: false,
type: "function"
}],
address: "0x3dbe4378e0ec4839552d036a46f653d0aee2f2ac",
transactionHash: "0xc57df09c7ee55c1bb45ee8dbee34cbf26a76e44402d6f4bb6512796b5db17bbc",
allEvents: function(),
say_hi: function()
}
When I call contract's function:
test_sol_test.say_hi()
I get the following output:
I0304 20:04:56.164980 internal/ethapi/api.go:1143] Tx(0x6d15e04db58c3fee5de1965884ca73420e82bdf45e0b6aed22afe7921f971938) to: 0x3dbe4378e0ec4839552d036a46f653d0aee2f2ac
"0x6d15e04db58c3fee5de1965884ca73420e82bdf45e0b6aed22afe7921f971938"
And when I'm trying to get info about transaction:
eth.getTransaction("0x6d15e04db58c3fee5de1965884ca73420e82bdf45e0b6aed22afe7921f971938")
{
blockHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
blockNumber: null,
from: "0xca9f9e8c2f482865c326718d5a33f80f8cc05cc0",
gas: 90000,
gasPrice: 20000000000,
hash: "0x6d15e04db58c3fee5de1965884ca73420e82bdf45e0b6aed22afe7921f971938",
input: "0x37bcda61",
nonce: 24,
r: "0x7bc50c0fb7322b4b0d44c15247e3e10d92818131b665ce4c5988de6185723df5",
s: "0x2ca4763ab0d291e5c66a2be39f2d50b7a5fcc0e86fc4e9a4d2ed42b4ddf3dbf4",
to: "0x3dbe4378e0ec4839552d036a46f653d0aee2f2ac",
transactionIndex: 0,
v: "0x1b",
value: 0
}
Value is 0, not HEX encoded "Hi".
Where am I wrong? How can I display that message?
datafield. Help me please – shegeley Mar 05 '17 at 06:49constadded to function as described in that link. But could you please explainwhyor give me good source to dig into this. – shegeley Mar 05 '17 at 15:37datafield of transaction on blockchain in case if that function in notconst? – shegeley Mar 06 '17 at 15:55