I have deployed:
contract test {
function multiply(uint a) returns(uint d) {
return a * 7;
}
}
I can call the contract with "eth_call" :
mpsp@ubuntu-slave2:~$ curl http://10.10.67.217:8545 --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to": "0x8e6f99f04148b1fb918cde7e44a94375f94dc745","data":"0xc6888fa10000000000000000000000000000000000000000000000000000000000000007"},"latest"],"id":1}'
the output is:
{"jsonrpc":"2.0","id":1,"result":"0x0000000000000000000000000000000000000000000000000000000000000031"}
But when I used "eth_sendTransaction" to invoke the contract and after mining, I used "eth_getTransactionReceipt" to get the result, and contract seemed not to be invoked. Here are my steps:
eth_sendTransaction
run: mpsp@ubuntu-slave2:~$ curl http://10.10.67.217:8545 --data '{"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"from":"0xc60ec7c68d47814288bdfdaa71b88ff922d735a7","to":"0x8e6f99f04148b1fb918cde7e44a94375f94dc745","gas":"0xC350","gasPrice":"0x1388","data":"0xc6888fa10000000000000000000000000000000000000000000000000000000000000003"}],"id":1}'
outputs: {"jsonrpc":"2.0","id":1,"result":"0xcff6d91d1693abe876c25ba03a58bc6ca693078b3a90e836f656e0dddb08a4cd"}
eth_getTransactionReceipt
run: curl http://10.10.67.217:8545 --data '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0xcff6d91d1693abe876c25ba03a58bc6ca693078b3a90e836f656e0dddb08a4cd"],"id":1}'
outputs: {"jsonrpc":"2.0","id":1,"result":{"blockHash":"0x26e23d45caf0c57159e88d9835c573a79f59a4fad0e7a7d70ea7a49780d14448","blockNumber":"0xc3a1","contractAddress":null,"cumulativeGasUsed":"0x5449","from":"0xc60ec7c68d47814288bdfdaa71b88ff922d735a7","gasUsed":"0x5449","logs":[],"root":"c42b14419677df59e3f593fccf03ea28f65bbd8927dcc9239dad6e77eb85f1a3","to":"0x8e6f99f04148b1fb918cde7e44a94375f94dc745","transactionHash":"0xcff6d91d1693abe876c25ba03a58bc6ca693078b3a90e836f656e0dddb08a4cd","transactionIndex":"0x0"}}
logs was empty in eth_getTransactionReceipt outputs.
Do you have some suggestions ?
Thank you!