Trying to call sendFundsToFriend() method on the testnet contract https://testnet.etherscan.io/address/0xce8efd03766a309af57ddeb9c79f3e7cd23da0df (contract code at https://gist.github.com/anonymous/5bdc3d9032a8b3cb5cba7c7625afa4d7 ) I got:
Warning! Error encountered during contract execution [Out of gas]
The tx result says:
Result: {
"blockHash": "0x585ca866c5143090c7a82443269d55658a176a018b1ad90827ec70adc1ff66c8",
"blockNumber": 465927,
"contractAddress": null,
"cumulativeGasUsed": 508930,
"from": "0xe5f68950d479fab12797dabbe5a4b0d88ec7a722",
"gasUsed": 58787,
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"root": "0x1289d7517d81fa8c4894c0cd97fd200ec4e9f0fecebba586435daca8e4e8f9ec",
"to": "0xce8efd03766a309af57ddeb9c79f3e7cd23da0df",
"transactionHash": "0x703d7657c093557d1cd42dfeb7b8d0d3b74e413d22e8009b26d7ac966c85d048",
"transactionIndex": 3
}
Transaction cost: 58787 gas.
When sending the tx, Transaction gas limit is set to 3000000, the default browser-solidity value.
If tx cost is 58787 gas and the limit is 3000000, why the out of gas error? Any idea? Thx!
P.S.: Tried a similar tx from a geth node instead of using metamask+browser-solidity and it worked ok:
https://testnet.etherscan.io/tx/0x56465b6594769578d9223ca902757780600dd2628074aedcf9635fb590b75bfa
So, I am doing something wrong with browser-solidity when calling the contract method, or might be some kind of bug in this environment...