Skip to content

Make organisation upgradeable by coding to an interface#5

Open
nrchandan wants to merge 1 commit intoelenadimitrova:masterfrom
nrchandan:upgrade-org
Open

Make organisation upgradeable by coding to an interface#5
nrchandan wants to merge 1 commit intoelenadimitrova:masterfrom
nrchandan:upgrade-org

Conversation

@nrchandan
Copy link
Contributor

The Parent contract is now coded to an Organisation interface
rather than its implementation. This enables upgrading of the
Organisation contract as long as the ABI doesn't change. This also
implies that Parent can no longer create Organisations. In this
implementation, Organisation needs to be instantiated by the user
and passed on to the Parent contract for registering or upgrading.

@nrchandan
Copy link
Contributor Author

Addresses issue #4

@nrchandan
Copy link
Contributor Author

Will push this again after rebasing with the latest master.

@elenadimitrova
Copy link
Owner

elenadimitrova commented Jul 3, 2017

Yes, indeed interfaces are the right way to abstract hard-linked contracts (i.e. contracts imported in other contracts and therefore wired in their upgrade) and this is a simple implementation of it, however the full model is a factory pattern we use that I thought a little overly complex to demonstrate in the article, see #4 (comment)

The Parent contract is now coded to an Organisation interface
rather than its implementation. This enables upgrading of the
Organisation contract as long as the ABI doesn't change. This also
implies that Parent can no longer create Organisations. In this
implementation, Organisation needs to be instantiated by the user
and passed on to the Parent contract for registering or upgrading.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants