67P / kredits-contracts-legacy

[DEPRECATED] Smart contracts for Kosmos Kredits
5 stars 3 forks source link

[WIP] Introduce TokenFactory for easier token contract updates #3

Closed bumi closed 7 years ago

bumi commented 7 years ago

Opening this PR to track the progress and for discussions.

The goal behind this change is to be able to update the token contract code without losing any history. It tries to do that by introducing a TokenFactory to deploy "child tokens" of a token. The TokenFactory contract can be configured and thus updated.

An immutable reference to a parent token contract is always kept in the child token contract and balances and logs can be looked up through that reference. Thus a chain of token contracts is generated (initial token -> child -> cild -> ....).

Currently the tokenfactory can be updated by the owner, but in the future that should be done through some kind of voting.

No idea if this works, all experiments :)

bumi commented 7 years ago

@skddc any thoughts on that? I think this is the way I will move forward with (after all the documentation and such)

raucao commented 7 years ago

So sorry, kinda forgot about this one. Will check it out today!