How to subgraph upgradable contracts

Hi, this is a general ask for guidelines about using upgrades properly with subgraphs.
I understand although the state is kept in the proxy, the events would be triggered in the implementations, so those would be the contracts to index in a subgraph.

When upgrading, should I add the new implementations addresses as sources for the subgraphs?
I couldn't find any docs about this, if someone could guide me to a tutorial or documents it would be great.

Thanks
Viken

:1234: Code to reproduce


:computer: Environment

The events will be triggered by the proxies, not by the implementations. So your indexing should be done on your proxy contracts.

1 Like