@@ -75,7 +75,7 @@ async function processNetwork(
75
75
toWatch [ networkKey ] = epochRange ;
76
76
}
77
77
78
- await processEpochsForNetwork (
78
+ await processEpochsForNetwork ( {
79
79
chainId,
80
80
path,
81
81
networkKey,
@@ -85,8 +85,8 @@ async function processNetwork(
85
85
outboxRPC,
86
86
toWatch,
87
87
transactionHandlers,
88
- emitter
89
- ) ;
88
+ emitter,
89
+ } ) ;
90
90
const currentLatestBlock = await veaOutboxProvider . getBlock ( "latest" ) ;
91
91
const currentLatestEpoch = Math . floor ( currentLatestBlock . timestamp / routeConfig [ network ] . epochPeriod ) ;
92
92
const toWatchEpochs = toWatch [ networkKey ] ;
@@ -97,18 +97,30 @@ async function processNetwork(
97
97
}
98
98
}
99
99
100
- async function processEpochsForNetwork (
101
- chainId : number ,
102
- path : number ,
103
- networkKey : string ,
104
- network : Network ,
105
- routeConfig : any ,
106
- inboxRPC : string ,
107
- outboxRPC : string ,
108
- toWatch : { [ key : string ] : number [ ] } ,
109
- transactionHandlers : { [ epoch : number ] : any } ,
110
- emitter : typeof defaultEmitter
111
- ) {
100
+ interface ProcessEpochParams {
101
+ chainId : number ;
102
+ path : number ;
103
+ networkKey : string ;
104
+ network : Network ;
105
+ routeConfig : any ;
106
+ inboxRPC : string ;
107
+ outboxRPC : string ;
108
+ toWatch : { [ key : string ] : number [ ] } ;
109
+ transactionHandlers : { [ epoch : number ] : any } ;
110
+ emitter : typeof defaultEmitter ;
111
+ }
112
+ async function processEpochsForNetwork ( {
113
+ chainId,
114
+ path,
115
+ networkKey,
116
+ network,
117
+ routeConfig,
118
+ inboxRPC,
119
+ outboxRPC,
120
+ toWatch,
121
+ transactionHandlers,
122
+ emitter,
123
+ } : ProcessEpochParams ) {
112
124
const privKey = process . env . PRIVATE_KEY ;
113
125
const veaInbox = getVeaInbox ( routeConfig [ network ] . veaInbox . address , privKey , inboxRPC , chainId , network ) ;
114
126
const veaOutbox = getVeaOutbox ( routeConfig [ network ] . veaOutbox . address , privKey , outboxRPC , chainId , network ) ;
0 commit comments