Commit 94fdaf4
fix: patch dedicatedFarm field for pre-V14 Farm event decoding
Existing indexer snapshots on all networks were built with an old
typesBundle that had a typo: "dedicatedFarm:" (trailing colon) in the
Farm struct. The stored JSON has "dedicatedFarm:" as the key, but the
processor expects "dedicatedFarm" (no colon) after the typesBundle was
corrected. This causes an assertion failure when decoding pre-V14
FarmStored/FarmUpdated events (specs 63-70).
Patch the raw event args by reading the actual value from the colon key
(falling back to the normal key for corrected indexers, then false for
versions that lack the field entirely), instead of hardcoding false
which discarded the real on-chain value.
Also read dedicatedFarm from the parsed event in farmStored instead of
hardcoding false, so farms created as dedicated are recorded correctly.
Production 2.12.3 had the workaround in the isV101 branch, which was
removed by the typegen automation when relabeling the hash as isV63.
Remove this workaround after all indexers are resynced with the
corrected typesBundle.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 01e6b28 commit 94fdaf4
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
| |||
46 | 53 | | |
47 | 54 | | |
48 | 55 | | |
49 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
50 | 59 | | |
51 | 60 | | |
52 | 61 | | |
| |||
133 | 142 | | |
134 | 143 | | |
135 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
136 | 148 | | |
137 | 149 | | |
138 | 150 | | |
| |||
0 commit comments