@@ -182,7 +182,7 @@ describe("HubPoolClient: RootBundle Events", function () {
182
182
it ( "gets most recent RootBundleExecuted event for chainID and L1 token" , async function ( ) {
183
183
const { tree : tree1 , leaves : leaves1 } = await constructSimpleTree ( toBNWei ( 100 ) ) ;
184
184
const { tree : tree2 , leaves : leaves2 } = await constructSimpleTree ( toBNWei ( 200 ) ) ;
185
- let runningBalance : BigNumber , incentiveBalance : BigNumber ;
185
+ let runningBalance : BigNumber ;
186
186
187
187
await configStoreClient . update ( ) ;
188
188
await hubPoolClient . update ( ) ;
@@ -196,58 +196,52 @@ describe("HubPoolClient: RootBundle Events", function () {
196
196
await hubPool . connect ( dataworker ) . executeRootBundle ( ...Object . values ( leaves1 [ 1 ] ) , tree1 . getHexProof ( leaves1 [ 1 ] ) ) ;
197
197
const firstRootBundleBlockNumber = await hubPool . provider . getBlockNumber ( ) ;
198
198
199
- ( { runningBalance, incentiveBalance } = hubPoolClient . getRunningBalanceBeforeBlockForChain (
199
+ ( { runningBalance } = hubPoolClient . getRunningBalanceBeforeBlockForChain (
200
200
firstRootBundleBlockNumber ,
201
201
constants . originChainId ,
202
202
l1Token_1 . address
203
203
) ) ;
204
204
expect ( runningBalance . eq ( 0 ) ) . to . be . true ;
205
- expect ( incentiveBalance . eq ( 0 ) ) . to . be . true ;
206
205
await hubPoolClient . update ( ) ;
207
206
208
207
// Happy case where client returns most recent running balance for chain ID and l1 token.
209
- ( { runningBalance, incentiveBalance } = hubPoolClient . getRunningBalanceBeforeBlockForChain (
208
+ ( { runningBalance } = hubPoolClient . getRunningBalanceBeforeBlockForChain (
210
209
firstRootBundleBlockNumber ,
211
210
constants . originChainId ,
212
211
l1Token_1 . address
213
212
) ) ;
214
213
expect ( runningBalance . eq ( toBNWei ( 100 ) ) ) . to . be . true ;
215
- expect ( incentiveBalance . eq ( 0 ) ) . to . be . true ;
216
214
217
215
// Target block is before event.
218
- ( { runningBalance, incentiveBalance } = hubPoolClient . getRunningBalanceBeforeBlockForChain (
216
+ ( { runningBalance } = hubPoolClient . getRunningBalanceBeforeBlockForChain (
219
217
0 ,
220
218
constants . originChainId ,
221
219
l1Token_1 . address
222
220
) ) ;
223
221
expect ( runningBalance . eq ( 0 ) ) . to . be . true ;
224
- expect ( incentiveBalance . eq ( 0 ) ) . to . be . true ;
225
222
226
223
// chain ID and L1 token combination not found.
227
- ( { runningBalance, incentiveBalance } = hubPoolClient . getRunningBalanceBeforeBlockForChain (
224
+ ( { runningBalance } = hubPoolClient . getRunningBalanceBeforeBlockForChain (
228
225
firstRootBundleBlockNumber ,
229
226
constants . destinationChainId ,
230
227
l1Token_1 . address
231
228
) ) ;
232
229
expect ( runningBalance . eq ( 0 ) ) . to . be . true ;
233
- expect ( incentiveBalance . eq ( 0 ) ) . to . be . true ;
234
230
235
- ( { runningBalance, incentiveBalance } = hubPoolClient . getRunningBalanceBeforeBlockForChain (
231
+ ( { runningBalance } = hubPoolClient . getRunningBalanceBeforeBlockForChain (
236
232
firstRootBundleBlockNumber ,
237
233
constants . originChainId ,
238
234
timer . address
239
235
) ) ;
240
236
expect ( runningBalance . eq ( 0 ) ) . to . be . true ;
241
- expect ( incentiveBalance . eq ( 0 ) ) . to . be . true ;
242
237
243
238
// Running balance at index of L1 token returned:
244
- ( { runningBalance, incentiveBalance } = hubPoolClient . getRunningBalanceBeforeBlockForChain (
239
+ ( { runningBalance } = hubPoolClient . getRunningBalanceBeforeBlockForChain (
245
240
firstRootBundleBlockNumber ,
246
241
constants . originChainId ,
247
242
l1Token_2 . address
248
243
) ) ;
249
244
expect ( runningBalance . eq ( toBNWei ( 200 ) ) ) . to . be . true ;
250
- expect ( incentiveBalance . eq ( 0 ) ) . to . be . true ;
251
245
252
246
// Propose and execute another root bundle:
253
247
await hubPool
@@ -260,21 +254,19 @@ describe("HubPoolClient: RootBundle Events", function () {
260
254
await hubPoolClient . update ( ) ;
261
255
262
256
// Grabs most up to date running balance for block:
263
- ( { runningBalance, incentiveBalance } = hubPoolClient . getRunningBalanceBeforeBlockForChain (
257
+ ( { runningBalance } = hubPoolClient . getRunningBalanceBeforeBlockForChain (
264
258
secondRootBundleBlockNumber ,
265
259
constants . originChainId ,
266
260
l1Token_1 . address
267
261
) ) ;
268
262
expect ( runningBalance . eq ( toBNWei ( 200 ) ) ) . to . be . true ; // Grabs second running balance
269
- expect ( incentiveBalance . eq ( 0 ) ) . to . be . true ;
270
263
271
- ( { runningBalance, incentiveBalance } = hubPoolClient . getRunningBalanceBeforeBlockForChain (
264
+ ( { runningBalance } = hubPoolClient . getRunningBalanceBeforeBlockForChain (
272
265
firstRootBundleBlockNumber ,
273
266
constants . originChainId ,
274
267
l1Token_1 . address
275
268
) ) ;
276
269
expect ( runningBalance . eq ( toBNWei ( 100 ) ) ) . to . be . true ; // Grabs first running balance
277
- expect ( incentiveBalance . eq ( 0 ) ) . to . be . true ;
278
270
} ) ;
279
271
280
272
it ( "returns proposed and disputed bundles" , async function ( ) {
0 commit comments