1

Is it possible to define a smart contract at a predictable address? 0xf0 CREATE in the Yellow Paper suggests that the address is deterministically determined by

x = A(Ia, σ[Ia]n)

page 29 of http://gavwood.com/paper.pdf

2

No. The address is always the hash of the RLP Serialization of the list of the creater's address and current nonce

  • 2
    As expected it is a hard problem, but not impossible. All one has to do is trying out EOA addresses, nonce is then 0, and hashing them to see the result and throw em away if you don't like it. A lot of work though. – Roland Kofler Jul 23 '16 at 14:49
1

Slightly off topic... (But related to Roland's comment on a previous answer.)

This could be looked at in a similar way to creating addresses for Tor's Hidden Services.

A hidden service (or .onion) address is derived from the public part of the private/public key pair used to communicate with the service. Generally, therefore, .onion URLs are a random string of alphanumeric characters.

To create a custom .onion address - such as Facebook's https://facebookcorewwwi.onion/ - you basically have to brute force the creation using tools such as Eschalot or Scallion. These tools create private/public key pairs and hash the resulting public key until they find a hash matching the string of your choice. The longer your desired string, the more work that's required.

An interesting project might be to make a similar tool for Ethereum contract addresses...

  • 1
    agree, maybe vanity contract addresses are something people want. – Roland Kofler Jul 23 '16 at 15:16

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.