pendulum-chain / pendulum-squids

The subsquid squids we use for Pendulum/Amplitude/Foucoco.
GNU General Public License v3.0
0 stars 0 forks source link

Refactor event and storage version selection #39

Closed gianfra-t closed 6 months ago

gianfra-t commented 6 months ago

Right now, when decoding and event or querying the storage, we are checking for the corresponding storage and event version one by one like here.

Given that in the near future we will most likely introduce several new versions, we should refactor the code and add some function like the one introduced in this PR that allows to select automatically the storage/event version corresponding to the context, and decode it.