{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/1739","labels_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/1739/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/1739/comments","events_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/1739/events","html_url":"https://github.com/ethereum/cpp-ethereum/issues/1739","id":70653826,"number":1739,"title":" NotEnoughCash Exception when sending transaction with web3","user":{"login":"tehMalone","id":2900488,"avatar_url":"https://avatars.githubusercontent.com/u/2900488?v=3","gravatar_id":"","url":"https://api.github.com/users/tehMalone","html_url":"https://github.com/tehMalone","followers_url":"https://api.github.com/users/tehMalone/followers","following_url":"https://api.github.com/users/tehMalone/following{/other_user}","gists_url":"https://api.github.com/users/tehMalone/gists{/gist_id}","starred_url":"https://api.github.com/users/tehMalone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tehMalone/subscriptions","organizations_url":"https://api.github.com/users/tehMalone/orgs","repos_url":"https://api.github.com/users/tehMalone/repos","events_url":"https://api.github.com/users/tehMalone/events{/privacy}","received_events_url":"https://api.github.com/users/tehMalone/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-04-24T10:38:07Z","updated_at":"2015-04-24T12:34:22Z","closed_at":null,"body":"Whenever I try to send a transaction through my GUI client I get this error:\r\n  ℹ  12:33:04 PM|alethzero  New transaction {aa6416e3…/20$0+2398510@10000000000000<-78ceb033… #4}\r\n  ℹ  12:33:04 PM|eth  #cc50952e… Dropping invalid transaction: /build/buildd/cpp-ethereum-0.9.13+750SNAPSHOT20150424081335trusty/libethereum/State.cpp(965): Throw in function void dev::eth::State::subBalance(dev::Address, dev::bigint)\r\nDynamic exception type: boost::exception_detail::clone_impl<dev::eth::NotEnoughCash>\r\nstd::exception::what: std::exception\r\n\r\nThe code I'm using \r\n\r\n$(\"#useClip\").on('click', function(){\r\n\tmachineInstance.sendTransaction().buyCoffee();\r\n});\r\n\r\nIs this a bug or am I doing something wrong?"},"comment":{"url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/comments/95918769","html_url":"https://github.com/ethereum/cpp-ethereum/issues/1739#issuecomment-95918769","issue_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/1739","id":95918769,"user":{"login":"CJentzsch","id":8452011,"avatar_url":"https://avatars.githubusercontent.com/u/8452011?v=3","gravatar_id":"","url":"https://api.github.com/users/CJentzsch","html_url":"https://github.com/CJentzsch","followers_url":"https://api.github.com/users/CJentzsch/followers","following_url":"https://api.github.com/users/CJentzsch/following{/other_user}","gists_url":"https://api.github.com/users/CJentzsch/gists{/gist_id}","starred_url":"https://api.github.com/users/CJentzsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJentzsch/subscriptions","organizations_url":"https://api.github.com/users/CJentzsch/orgs","repos_url":"https://api.github.com/users/CJentzsch/repos","events_url":"https://api.github.com/users/CJentzsch/events{/privacy}","received_events_url":"https://api.github.com/users/CJentzsch/received_events","type":"User","site_admin":false},"created_at":"2015-04-24T12:34:22Z","updated_at":"2015-04-24T12:34:22Z","body":"thats not trivial, generally it can depend on block number, and many other environment paramters. But you can now exactly how much ether you need for a transaction by specifiying gas (=gasLimit) and gasPrice, and you get back the gas you didnt use. Just try it out, then you know how much gas it used.\r\n"}}