Say you want to create a new utility token offering, and owning that token will be useful in an application still in development. You don't want to dissuade people from purchasing by requiring a lot of information up front during the sale, but rather, you want to allow them to associate their tokens with their account in the forthcoming application.

Is this possible, and if so, what are your suggestions for doing so?


  • newbie here, might be a dumb or obvious question
  • I suppose you'd be able to validate the number of tokens with a wallet address, but that information is public AFAIK, so that wouldn't be very helpful
  • functionality can be built into the original contract to make this work



Yes, it is possible. As a matter of fact, I'd say 100% of tokens have been designed like this so far. If you follow the ERC20 specification, the token will have a few common functions than any other contract can understand and interact with.

Tokens are just a balance inside a contract, and any other contract can read that and call functions o it. Specifically having another contract use balance from the token would require the tokens' owner to approve first.

You can later develop any other contract that reads the balance an account has of your token and code whatever you want to do with those tokens.

One of the few things you should try to get right with the token at this point is how divisible it would be and what the supply would be, as it could limit future uses you want to implement for it.

  • Thanks @pabloruiz55, so in the typical ERC20 contract, there's a "balanceOf" function github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/… Is that the typical function you're referring to? If so, does that get the balance of a particular owner, or the balance of the contract creator? And if it is the function, what prevents someone from simply typing in someone else's wallet address? That's public information correct? Thanks for dumbing this down for me.
    – Jamie T.
    Nov 27 '17 at 22:18
  • Erc20 tokens all implement these functions: theethereum.wiki/w/index.php/ERC20_Token_Standard Nov 28 '17 at 0:55
  • And yes, anyone can call the balanceof function and pass any address to know their token balance. Nov 28 '17 at 0:56

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.