I understand that you can't edit a contract, you can only create a new version of one. However, its not clear to me how the new contract can manage tokens created by the old contract. How does this work?


The only way that the new contract could manage the tokens is if you set the new address as the 'owner' of the token contract and assigned the balance, that is assigned to the previous owner, to the new address.

Another answer that I've written explaining about token contracts might help to clear things up for you.

If you need to upgrade the token contract, then it might be necessary to migrate the balances from the old token contract to the new one when you upgrade / create the new token contract.

  • This is sort of how I thought it worked, the contract manages the tokens because it maintains the ledger for them. If you moved the tokens to a different contract any existing users wouldn't be affected, right? They wouldn't know that there was a change. I've read about strategies for contracts like using redirects and versions that address the overall issue, but wanted to make sure I understood the core issue. – John Mott Oct 3 '17 at 18:01

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.