2

I have a noob question about contract creation. I'm following this tutorial: https://www.ethereum.org/dao However there's a step in there that I don't quite understand. After I enter the contract code, fill out my values for how I want the contract to work, at the bottom I see this:

Total: 0.02977296 ETHER

Now at the top of the contract, it says AMOUNT: 0.00 ETHER and gives me an option to send ether to the contract.

Do I have to send the contract ether? And if so, how would I determine how much ether to send it? Do I keep that top box at 0.00 ether and just let the total at the bottom be 0.02977296 ETHER? I'm a little confused.

3

No, you don't need to send Ether to the contract. All you need to send is the fee that you pay the network to create the contract (gas), which you see displayed under "Select fee" in the example.

However, if you want the contract to control some Ether, and you don't want to go to the trouble of making an extra transaction in addition to the one that you're sending to create the contract, you may find it to convenient to send Ether to the contract when you create it.

  • Perfect, thanks for the reply! So when the contract is created, and you're performing functions on the contract, in this DAO case, it's create new proposal, change properties, etc. That also takes gas to use the function. Where does that gas come from if you don't send any ETH to the contract? – Joshua Terrill Jul 27 '16 at 8:20
  • Create new proposal etc would be new transactions, so you will need to supply the gas for them when you send those transactions. – Edmund Edgar Jul 27 '16 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.