@@ -9,9 +9,18 @@ import * as otokenAbi20241221 from '@abi/otoken-2024-12-21'
9
9
import * as otokenHarvester from '@abi/otoken-base-harvester'
10
10
import * as otokenUpgradeAccountsAbi from '@abi/otoken-upgradeAccounts'
11
11
import { OTokenAsset , OTokenRawData } from '@model'
12
- import { Block , Context , defineProcessor , env , logFilter , multicall , traceFilter } from '@originprotocol/squid-utils'
12
+ import {
13
+ Block ,
14
+ Context ,
15
+ EvmBatchProcessor ,
16
+ defineProcessor ,
17
+ env ,
18
+ logFilter ,
19
+ multicall ,
20
+ traceFilter ,
21
+ } from '@originprotocol/squid-utils'
13
22
import { CurrencyAddress , CurrencySymbol } from '@shared/post-processors/exchange-rates/mainnetCurrencies'
14
- import { EvmBatchProcessor , Trace } from '@subsquid/evm-processor'
23
+ import { Trace } from '@subsquid/evm-processor'
15
24
import { bigintJsonParse , bigintJsonStringify } from '@utils/bigintJson'
16
25
17
26
import { areContracts , loadIsContractCache , saveIsContractCache } from '../../utils/isContract'
@@ -59,7 +68,7 @@ const endSection = (section: string) => {
59
68
const logPerformanceStats = ( ) => {
60
69
if ( ! DEBUG_PERF ) return
61
70
let totalTime = 0
62
- for ( const [ _ , stats ] of performanceStats ) {
71
+ for ( const stats of performanceStats . values ( ) ) {
63
72
totalTime += stats . totalTime
64
73
}
65
74
@@ -250,7 +259,7 @@ export const createOTokenProcessor2 = (params: {
250
259
251
260
let otoken : OTokenClass
252
261
let producer : OTokenEntityProducer
253
- let hasUpgraded = false
262
+ // let hasUpgraded = false
254
263
255
264
return defineProcessor ( {
256
265
name : `otoken2-${ otokenAddress } ` ,
@@ -270,8 +279,10 @@ export const createOTokenProcessor2 = (params: {
270
279
// })
271
280
272
281
// Monkeypatch Hack
282
+ // eslint-disable-next-line
273
283
const originalAddTrace = processor . addTrace
274
284
function modifiedMapRequest < T extends { range ?: { from : number } } > ( options : T ) : Omit < T , 'range' > {
285
+ // eslint-disable-next-line
275
286
let { range, ...req } = options
276
287
for ( let key in req ) {
277
288
let val = ( req as any ) [ key ]
@@ -395,8 +406,8 @@ export const createOTokenProcessor2 = (params: {
395
406
copyData ( otoken , newImplementation )
396
407
otoken = newImplementation
397
408
producer . otoken = newImplementation
398
- justUpgraded = true
399
- hasUpgraded = true
409
+ // justUpgraded = true
410
+ // hasUpgraded = true
400
411
} else {
401
412
throw new Error ( 'Implementation hash not found.' )
402
413
}
@@ -433,7 +444,7 @@ export const createOTokenProcessor2 = (params: {
433
444
}
434
445
}
435
446
436
- let justUpgraded = false
447
+ // let justUpgraded = false
437
448
438
449
// Cache isContract results
439
450
const transferRelated = ctx . blocks
@@ -854,6 +865,7 @@ const saveOTokenRawData = async (ctx: Context, block: Block, otoken: OTokenClass
854
865
}
855
866
}
856
867
868
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
857
869
const checkState = async ( ctx : Context , block : Block , otoken : OTokenClass , addressesToCheck : Set < string > ) => {
858
870
ctx . log . info ( `checking state at height ${ block . header . height } ` )
859
871
let wrongCount = 0
0 commit comments