connect
connect copied to clipboard
Subgraphs: handle app upgrades
Currently we only use the appId
in each app subgraph to determine a contract template.
However, an app instance may actually go through multiple versions (e.g. as they did when we upgraded 0.6 to 0.7 organizations), and this is ultimately in the control of the app developer and organization.
Ideally app subgraphs would be able to detect if an app changed its implementation address and switch to a different contract template which defines different event handlers. Technically we should be able to know when to do this if we also listen to all Kernel SetApp
events, but it's unclear how we would switch the template (outside of encoding a version in the entity and sprinkling if/else
s everywhere).
cc @facuspagnuolo