Open nrchandan opened 7 years ago
I have used this idea in making my contract upgradeable too: https://github.com/Imaginea/lms/blob/master/contracts/Parent.sol
Thanks for pointing it out @nrchandan , it's a valid comment and I am aware of this, however the aim of this repo was to present a simplified version of the upgrade design which you can then replicate across a network of contracts. i.e. I was aiming to demonstrate the upgrade ideas around a single contract i.e. Organisation
.
In production, we are in fact using a factory design pattern to solve this, however I found that was complicating the article somewhat unnecessary but perhaps I was wrong to assume it. I'll see if I can include it as an update to this article when I get a chance.
Since Parent is coded to a specific implementation of the Organisation contract, upgrading the contract is not possible. This can be achieved by coding to an Organisation interface instead.