@@ -14,6 +14,7 @@ export const NodeSdkLive = NodeSdk.layer(() => ({
1414 ) ,
1515} ) ) ;
1616
17+ import { FetchService } from 'api/common' ;
1718import { AddressValidationServiceLive } from '../../../packages/api/src/common/address-validation/addressValidation' ;
1819import { GetCaviarnineResourcePoolPositionsLive } from '../../../packages/api/src/common/dapps/caviarnine/getCaviarnineResourcePoolPositions' ;
1920import { GetHyperstakePositionsLive } from '../../../packages/api/src/common/dapps/caviarnine/getHyperstakePositions' ;
@@ -59,12 +60,13 @@ import { AggregateCaviarninePositionsLive } from '../../../packages/api/src/ince
5960import { AggregateDefiPlazaPositionsLive } from '../../../packages/api/src/incentives/account-balance/aggregateDefiPlazaPositions' ;
6061import { AggregateOciswapPositionsLive } from '../../../packages/api/src/incentives/account-balance/aggregateOciswapPositions' ;
6162import { AggregatePoolPositionsService } from '../../../packages/api/src/incentives/account-balance/aggregatePoolPositions' ;
62- import { AggregateRootFinancePositionsLive } from '../../../packages/api/src/incentives/account-balance/aggregateRootFinancePositions' ;
63+ import { AggregateRootFinancePositionsService } from '../../../packages/api/src/incentives/account-balance/aggregateRootFinancePositions' ;
6364import { AggregateSurgePositionsLive } from '../../../packages/api/src/incentives/account-balance/aggregateSurgePositions' ;
64- import { AggregateWeftFinancePositionsLive } from '../../../packages/api/src/incentives/account-balance/aggregateWeftFinancePositions' ;
65+ import { AggregateWeftFinancePositionsService } from '../../../packages/api/src/incentives/account-balance/aggregateWeftFinancePositions' ;
6566import { XrdBalanceLive } from '../../../packages/api/src/incentives/account-balance/aggregateXrdBalance' ;
6667import { GetAccountBalancesAtStateVersionLive } from '../../../packages/api/src/incentives/account-balance/getAccountBalancesAtStateVersion' ;
6768import { UpsertAccountBalancesLive } from '../../../packages/api/src/incentives/account-balance/upsertAccountBalance' ;
69+ import { ConfigService } from '../../../packages/api/src/incentives/config/configService' ;
6870// Snapshot services
6971import { CreateSnapshotLive } from '../../../packages/api/src/incentives/snapshot/createSnapshot' ;
7072import { UpdateSnapshotLive } from '../../../packages/api/src/incentives/snapshot/updateSnapshot' ;
@@ -278,10 +280,14 @@ const runnable = Effect.gen(function* () {
278280 ) ;
279281
280282 const aggregateWeftFinancePositionsLive =
281- AggregateWeftFinancePositionsLive . pipe ( Layer . provide ( getUsdValueLive ) ) ;
283+ AggregateWeftFinancePositionsService . Default . pipe (
284+ Layer . provide ( getUsdValueLive ) ,
285+ ) ;
282286
283287 const aggregateRootFinancePositionsLive =
284- AggregateRootFinancePositionsLive . pipe ( Layer . provide ( getUsdValueLive ) ) ;
288+ AggregateRootFinancePositionsService . Default . pipe (
289+ Layer . provide ( getUsdValueLive ) ,
290+ ) ;
285291
286292 const aggregateDefiPlazaPositionsLive = AggregateDefiPlazaPositionsLive . pipe (
287293 Layer . provide ( getUsdValueLive ) ,
@@ -359,6 +365,9 @@ const runnable = Effect.gen(function* () {
359365 Layer . provide ( addressValidationServiceLive ) ,
360366 ) ;
361367
368+ const configServiceLive = ConfigService . Default ;
369+ const fetchServiceLive = FetchService . Default ;
370+
362371 const snapshotLive = SnapshotService . Default . pipe (
363372 Layer . provide ( gatewayApiClientLive ) ,
364373 Layer . provide ( getAccountBalancesAtStateVersionLive ) ,
@@ -370,24 +379,60 @@ const runnable = Effect.gen(function* () {
370379 Layer . provide ( aggregateAccountBalanceLive ) ,
371380 Layer . provide ( getAllValidatorsServiceLive ) ,
372381 Layer . provide ( aggregatePoolPositionsLive ) ,
382+ Layer . provide ( configServiceLive ) ,
383+ Layer . provide ( fetchServiceLive ) ,
384+ Layer . provide ( getLedgerStateLive ) ,
385+ Layer . provide ( dbClientLive ) ,
373386 ) ;
374387
375388 const service = yield * Effect . provide ( SnapshotService , snapshotLive ) ;
376389
377- const addresses = yield * Effect . tryPromise ( ( ) =>
390+ const _addresses = yield * Effect . tryPromise ( ( ) =>
378391 db . query . accounts
379392 . findMany ( {
380393 limit : 10 ,
381394 } )
382395 . then ( ( res ) => res . map ( ( r ) => r . address ) ) ,
383396 ) ;
384397
385- const testAccountAddress = process . env . TEST_ACCOUNT_ADDRESS ;
398+ const _testAccountAddress = process . env . TEST_ACCOUNT_ADDRESS ;
386399
387400 yield * service ( {
388- timestamp : new Date ( '2025-07-20T00 :00:00.000Z' ) ,
401+ timestamp : new Date ( '2024-09-01T00 :00:00.000Z' ) ,
389402 batchSize : 10_000 ,
390- addresses : testAccountAddress ? [ testAccountAddress ] : addresses ,
403+ addresses : [
404+ 'account_rdx1280003ttgydsuus9dl3ag4mn7l37lktqtt3z9rqun3cecx8spj0xmw' ,
405+ 'account_rdx1280007fzy8wxjvlw2u23lge4p5kyttnuzezmww8j44rlcr708s75qs' ,
406+ 'account_rdx128000lh2huxqyfjug5gux3tqgxs723693uu7dyfwkx9fsdpj9r7la7' ,
407+ ] ,
408+ addDummyData : false ,
409+ includeActivityIds : [
410+ 'c9_ho_floop-xrd' ,
411+ 'c9_ho_lsulp-reddicks' ,
412+ 'c9_ho_lsulp-xrd' ,
413+ 'c9_ho_xeth-xrd' ,
414+ 'c9_ho_xrd-xusdc' ,
415+ 'c9_ho_xrd-xusdt' ,
416+ 'c9_ho_xrd-xwbtc' ,
417+ 'dp_ho_dfp2-xrd' ,
418+ 'dp_ho_xeth-xrd' ,
419+ 'dp_ho_xrd-xusdc' ,
420+ 'dp_ho_xrd-xusdt' ,
421+ 'dp_ho_xrd-xwbtc' ,
422+ 'oc_ho_early-xrd' ,
423+ 'oc_ho_ilis-xrd' ,
424+ 'oc_ho_oci-xrd' ,
425+ 'oc_ho_xeth-xrd' ,
426+ 'oc_ho_xrd-xusdc' ,
427+ 'oc_ho_xrd-xusdt' ,
428+ 'oc_ho_xrd-xwbtc' ,
429+ 'ro_ho_lsulp' ,
430+ 'ro_ho_xrd' ,
431+ 'we_ho_lsulp' ,
432+ 'we_ho_stakedXrd' ,
433+ 'we_ho_unstakedXrd' ,
434+ 'we_ho_xrd' ,
435+ ] ,
391436 } ) . pipe ( Effect . provide ( NodeSdkLive ) ) ;
392437} ) ;
393438
0 commit comments