CORIONplatform / solidity

GNU General Public License v3.0
12 stars 9 forks source link

tokenDB.sol contract is not upgradable. #34

Closed Dexaran closed 7 years ago

Dexaran commented 7 years ago

The problem: tokenDB.sol contract doesn't implement any upgrading mechanisms. I think that it is a critical flaw.

Suggestion:

  1. The contract should implement a function to stop it (disallow increases and decreases).
  2. The contract should implement a migration mechanism. This will allow to deploy a new contract and connect tokens with a new DataBase.
  3. The contract should implement functions to transfer the balances from the old version of the contract to the new contract. (It can be useful to automatically reflect balances from old contract to a new one on each call of old contract)
iFA88 commented 7 years ago

This is what i would like. I want never replace database contract, this is why I have coded simply.

  1. The database write functions can only can only call one address as owner.
  2. If the token contract will be replaced, then the tokenDB will set tokenDB owner to the new token address.
  3. This would be only necessary for the future if we replace database contract.