1

I'm aware how we can make an externally owned account:

e.g. in geth use: "geth new accounts" in MyEthereumWallet, we put a password and it generates address and private key.

Wha about a contract account? In geth when I deploy my contract it returns an address of the contract. Can I generate the address and account first and then deploy the contract?

Question: How to generate a contract account in Ethereum?

4

But can I generate the address and account first and then deploy the contract?

When you deploy your contract to the network, its address will be generated from the SHA3 hash of the creator's address together with the nonce of the creator's account. (The creator can be an externally owned account or another contract.)

So yes, you can determine what the contract's address will be beforehand (using the above information), but you can't just pick an address at random and deploy a contract to it.

| improve this answer | |

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.