I know this issue was discussed before several times, but I cant get the solution to my problem from any of the answers,
My contract got deployed fine before adding the following function,
function setApproval(address addr, bool approved)payable returns(string, uint, uint) {
//some logical operations and assignments
}
as soon as I add the function and try to deploy the contract, I got this error
Error encountered, bailing. Network state unknown. Review successful transactions manually. Error: The contract code couldn't be stored, please check your gas amount.
test rpc server shows following logs
Transaction: 0xd5791ac0c6059cbd43e00a7fabe566ada3f0572966f12ff25da6e04215840f39 Contract created: 0x9062592c5dd06340401c1e750ddb025defabf5be Gas usage: 4712388 Block Number: 16 Block Time: Sat Jul 22 2017 03:30:30 GMT+0530 (India Standard Time) Runtime Error: out of gas
again after removing this function contract deployed without errors
what is wrong with this function?
My contract code is around 250 lines, is there any limit on contract code size??
Thanks in advance
gasLimit
setting, if any.eth.sendTransaction(params...., { gas: 10000000 })
.setApproval()
funnction is getting deployed without any error and I can call the functions with the method you have suggested, but as soon as I add this particular function and try to redeploy the contract I get the error message which I have specified in the question