Skip to content

Instantly share code, notes, and snippets.

@tloriato
Created November 30, 2017 14:20
Show Gist options
  • Save tloriato/208a656d9ad478407a02a1838131caef to your computer and use it in GitHub Desktop.
Save tloriato/208a656d9ad478407a02a1838131caef to your computer and use it in GitHub Desktop.

One method is to use a System of Contracts as outlined below:

Contract "Register" - will contain pairs "name - address" for all contracts of your system;

  1. Contract Backend;
  2. Contract Frontend using Backend;
  3. Deploy Register & get address of it;
  4. Deploy Backend & register address of Backend into already deployed Register;
  5. Hardcode the address of Register into source of Backend. Before any call Backend from Frontend you should call your Register and get the actual address of Backend.

Then you can update your Backend contract any time - simply deploy the new one and re-register them in the Register.

One implementation of a similar approach as stated above would be this repo:

Seems like a really good point of departure when looking to implement this, possible on the next sprint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment