2

We can create ERC20 tokens using solidity or even metamask.. but how to create unique address to transfer them?

I mean token like Gold reward or coins like Bitconnect has it's own pattern of address to transfer in between. how to do that?

In HitBTC also for every token you will get unique address to send..

if is there any way to do this, need to do that during the contract deployment or can be done after creating the simple token ?

1
  • All smart contracts have unique addresses. Commented Dec 26, 2017 at 11:28

2 Answers 2

3

tl;dr contract addresses are always unique as they are determined based off the address creating the account, and the nonce of that address. This means that no two contracts will have the same address, but that with a bit of trial and error we can easily make contracts with "vanity" addresses. See below

The address of a contract is determined based on the address of the account creating the contract, and the nonce of the account. So when you use an account to deploy a contract, that contract starts off with a nonce of 1, that is only created during contract creation,aka when the create opcode is called. This means you can EASILY pre-calculate the addresses of contracts that will be generated by an account (be that a contract account, or an EOA).

So to get a contract address that is slightly customized, you would have to try multiple different public/private key pairs to see which one will generate an address that you want. I wrote a contract that can be used to calculate addresses:

https://github.com/postables/Solidity-Modules/blob/master/Contracts/AddressGenerationCalculator.sol

2

I assume you mean being able to create vanity addresses that start with some characters of your choosing. If it's that so, you can check this tool:

https://github.com/MyEtherWallet/VanityEth

** I haven't tried it, can't vouch for it and its security.

** If you are going to use it, make sure the accounts or contract addresses generated really work before using it in production.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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