I'm new user of Ethereum. My error :
Runtime Error: out of gas
My contract : https://github.com/cbourree/test/wiki
I compile with : https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.0+commit.acd334c9.js
"web3 deployed" generate with solidity : https://github.com/cbourree/test/wiki/Compiled-contract
I run testrpc -u 0 -u 1
On Chrome Console :
I run "web3 deployed" commandes
web3.fromWei(web3.eth.getBalance("0xafd05e5884d2cccc947b76da3e4af9025b677002"), "ether").toNumber(); //0xaf...002 address of my contract
WORK (return 10 Eth) ! But :
roulette.betEven(10, { from: web3.eth.accounts[1], value: web3.toWei(1, "ether") })
->Error : out of gas
The code comes from this tutorial : https://www.ethereum-france.com/ecrire-une-dapp-pour-ethereum-1-smart-contract/
Edit : I can execute the contract in truffle console without error
EDIT 2
When i run
roulette.betOdd({ from: web3.eth.accounts[1] })
then
roulette.betOdd({ from: web3.eth.accounts[1], value: web3.toWei(10, "ether") })
I havn't error. But i don't understand why ???