Inspiration

Recently worked on Dapp for split-key address generation on smart contract with Vanitygen - 1Address.io and came up to idea implement tradable smart contract addresses. Anyone will be able to generate nice addresses and trade them on ERC721-compatible decentralized exchanges.

What it does

ERC721 token, each of which allows deploying arbitrary smart contract to specific address.

How I built it

ERC721 token smart contract itself owns tiny deployers smart contracts, which are paired with tokens and their first deploy will be to vanity address. We wrote necessary smart contracts, some tests, github-pages hosted Dapp and hundreds of amended commits :)

Challenges I ran into

For some reason calling deploy method of deployer from wallet works fine, but making same call over ERC721 smart contract gives error on selfdestruct. Temporary replaced selfdestruct with zeroing owner - to prevent deployer reuse. Faced really weird errors - reverted transaction still have killed subcontracts: https://etherscan.io/tx/0x87ce82d54aaa8002407e350d2744c524138678ee7a46484a8eae282abb2c1565#internal

Accomplishments that I'm proud of

ERC721 compatibility and protection from wide range of attacks.

What I learned

Etherscan.io have enough bugs - already reported at least two. First time used ERC721.

What's next for AddressToken

Will wait until CREATE2 feature released in Ethereum mainnet to reduce gas consumption. Going to upgrade token to the new version by approve/transferFrom to new token contract.

Links

Web UI: AddressToken.io Smart contract and web repo: https://github.com/1Address/AddressToken/ VanityEth fork with deployer feature added: https://github.com/1Address/VanityEth/tree/feature/deployer The latest version of AddressToken smart contract in Ethereum mainnet: https://etherscan.io/address/0xCc4dEfd34fC7C72aFe3750bb01f80600Cf4FAcb7#code

How to generate own token

  1. Generate deployer address with patched VanityEth: node index.js --deployer -i 77777
  2. Get some ether on the generated wallet and import it to metamask
  3. Open AddressToken.io
  4. On the second tab, press button Create and wait until mined
  5. On the third tab, press button Convert and wait until mined
  6. Hola! You have ERC721 token on this wallet.
  7. You can use it on the first tab to deploy something or go sell it on DEX

Built With

Share this project:
×

Updates