I'm trying to deploy a contract into ethereum, but I keep getting "out of gas" error.
How can I know in advance how much ethers I need to deploy a contract?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
One online tool (no syncing, no installing) is Remix a.k.a. Browser Solidity.
In screen shot below, a trivial contract called "Mortal" cost 319,273 gas to deploy.
Hope it helps.