9
9
import { Store } from '@subsquid/typeorm-store'
10
10
import { events as erc721 } from './abi/ERC721'
11
11
import { events as registry } from './abi/Registry'
12
- import { ENV_CONTRACTS , FINALITY_CONFIRMATION , STARTING_BLOCK , disabledRPC , getArchiveUrl , getNodeUrl } from './environment'
12
+ import { ENV_CONTRACTS , FINALITY_CONFIRMATION , PREINDEX_BLOCK , STARTING_BLOCK , disabledRPC , getArchiveUrl , getNodeUrl } from './environment'
13
13
import { contractList } from './processable'
14
14
15
15
// export const CONTRACT_ADDRESS = '0x6e0bed56fb3eb7d2fecc5bb71f99e844cd3c2a0b'
@@ -33,10 +33,10 @@ export const processor = new EvmBatchProcessor()
33
33
} )
34
34
. setRpcDataIngestionSettings ( { disabled : disabledRPC } )
35
35
. setFinalityConfirmation ( FINALITY_CONFIRMATION )
36
- . setBlockRange ( {
37
- from : STARTING_BLOCK
38
- // from: 2_852_779
39
- } )
36
+ // .setBlockRange({
37
+ // from: STARTING_BLOCK
38
+ // // from: 2_852_779
39
+ // })
40
40
. setFields ( {
41
41
log : {
42
42
topics : true ,
@@ -47,30 +47,33 @@ export const processor = new EvmBatchProcessor()
47
47
. addLog ( {
48
48
address : [ ENV_CONTRACTS . REGISTRY ] ,
49
49
topic0 : [ registry . CollectionRegistered . topic ] ,
50
- // range: {
51
- // from: STARTING_BLOCK
52
- // }
50
+ range : {
51
+ from : STARTING_BLOCK
52
+ }
53
53
// transaction: true
54
54
} )
55
55
. addLog ( {
56
56
topic0 : [ erc721 . Transfer . topic ] ,
57
- // range: {
58
- // from: STARTING_BLOCK
59
- // }
57
+ range : {
58
+ from : STARTING_BLOCK
59
+ }
60
60
// transaction: true
61
61
} )
62
62
63
- // contractList.forEach((contract) => {
64
- // processor.addLog({
65
- // address: [contract],
66
- // topic0: [erc721.Transfer.topic],
67
- // range: {
68
- // from: 0,
69
- // to: STARTING_BLOCK
70
- // }
71
- // // transaction: true
72
- // })
73
- // })
63
+ if ( PREINDEX_BLOCK ) {
64
+ contractList . forEach ( ( contract ) => {
65
+ processor . addLog ( {
66
+ address : [ contract ] ,
67
+ topic0 : [ erc721 . Transfer . topic ] ,
68
+ range : {
69
+ from : PREINDEX_BLOCK ,
70
+ to : STARTING_BLOCK
71
+ }
72
+ // transaction: true
73
+ } )
74
+ } )
75
+ }
76
+
74
77
75
78
// .addLog({
76
79
// address: [Contracts.Conjunto],
0 commit comments