0

This question already has an answer here:

How does ethereum generate Smart Contract addresses? It is any different from Ethereum generating addresses for accounts, (which uses rightmost 160 bits of the keccak256(Elliptic curve pub key) - see yellow paper). Does the ethereum contract generation differ from account address generation?

marked as duplicate by Ismael, Achala Dissanayake, Richard Horrocks, Badr Bellaj Jul 23 '18 at 11:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

The address for smart contracts are generated using the nonce of the contract creation transaction and the address of the contract creator. This is different than EOA address creation which is simply generating a 256 bit private key.

Take a look here.

In Python, using pyethereum:

def mk_contract_address(sender, nonce):
    return sha3(rlp.encode([normalize_address(sender), nonce]))[12:]

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