From 83a405d74c0db5f72f8a7bb559bd5871ddab27cc Mon Sep 17 00:00:00 2001 From: shane-moore Date: Mon, 9 Sep 2024 11:12:09 -0700 Subject: [PATCH 1/4] refactor: denom holders --- packages/sdk-ts/package.json | 2 +- .../grpc/IndexerGrpcArchiverApi.spec.ts | 27 ++++++++++- .../indexer/grpc/IndexerGrpcArchiverApi.ts | 47 +++++++++++++++++++ .../indexer/grpc/IndexerGrpcPortfolioApi.ts | 47 ------------------- .../IndexerAccountPortfolioTransformer.ts | 13 ----- .../IndexerGrpcArchiverTransformer.ts | 17 ++++++- .../client/indexer/types/account-portfolio.ts | 11 ----- .../src/client/indexer/types/archiver.ts | 11 +++++ yarn.lock | 8 ++-- 9 files changed, 103 insertions(+), 80 deletions(-) diff --git a/packages/sdk-ts/package.json b/packages/sdk-ts/package.json index e09268ea9..4c50d710e 100644 --- a/packages/sdk-ts/package.json +++ b/packages/sdk-ts/package.json @@ -44,7 +44,7 @@ "@injectivelabs/grpc-web": "^0.0.1", "@injectivelabs/grpc-web-node-http-transport": "^0.0.2", "@injectivelabs/grpc-web-react-native-transport": "^0.0.2", - "@injectivelabs/indexer-proto-ts": "1.11.49", + "@injectivelabs/indexer-proto-ts": "1.11.52", "@injectivelabs/mito-proto-ts": "1.0.65", "@injectivelabs/networks": "^1.14.14", "@injectivelabs/test-utils": "^1.14.14", diff --git a/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcArchiverApi.spec.ts b/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcArchiverApi.spec.ts index 0d2353de4..fb36f64f4 100644 --- a/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcArchiverApi.spec.ts +++ b/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcArchiverApi.spec.ts @@ -1,12 +1,13 @@ import { getNetworkEndpoints, Network } from '@injectivelabs/networks' +import { INJ_DENOM } from '@injectivelabs/utils' import { mockFactory } from '@injectivelabs/test-utils' import { IndexerGrpcArchiverTransformer } from '../transformers' import { IndexerGrpcArchiverApi } from './IndexerGrpcArchiverApi' const account = mockFactory.injectiveAddress const resolution = '1D' -const startDate = 1622505600 -const endDate = 1625097600 +const startDate = String(1622505600) +const endDate = String(1625097600) const limit = 10 const endpoints = getNetworkEndpoints(Network.MainnetSentry) const indexerGrpcArchiverApi = new IndexerGrpcArchiverApi(endpoints.indexer) @@ -173,4 +174,26 @@ describe('IndexerGrpcArchiverApi', () => { ) } }) + + test('fetchDenomHolders', async () => { + try { + const response = await indexerGrpcArchiverApi.fetchDenomHolders({ + denom: INJ_DENOM, + limit, + }) + + expect(response).toBeDefined() + expect(response).toEqual( + expect.objectContaining< + ReturnType< + typeof IndexerGrpcArchiverTransformer.grpcDenomHoldersResponseToDenomHolders + > + >(response), + ) + } catch (e) { + console.error( + 'IndexerGrpcArchiverApi.fetchDenomHolders => ' + (e as any).message, + ) + } + }) }) diff --git a/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcArchiverApi.ts b/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcArchiverApi.ts index db16c1c33..a3d8aa156 100644 --- a/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcArchiverApi.ts +++ b/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcArchiverApi.ts @@ -305,4 +305,51 @@ export class IndexerGrpcArchiverApi extends BaseGrpcConsumer { }) } } + + async fetchDenomHolders({ + denom, + token, + limit, + }: { + denom: string + token?: string + limit?: number + }) { + const request = InjectiveArchiverRpc.DenomHoldersRequest.create() + + request.denom = denom + + if (token) { + request.token = token + } + + if (limit) { + request.limit = limit + } + + try { + const response = + await this.retry(() => + this.client.DenomHolders(request), + ) + + return IndexerGrpcArchiverTransformer.grpcDenomHoldersResponseToDenomHolders( + response, + ) + } catch (e: unknown) { + if (e instanceof InjectiveArchiverRpc.GrpcWebError) { + throw new GrpcUnaryRequestException(new Error(e.toString()), { + code: e.code, + context: 'DenomHolders', + contextModule: this.module, + }) + } + + throw new GrpcUnaryRequestException(e as Error, { + code: UnspecifiedErrorCode, + context: 'DenomHolders', + contextModule: this.module, + }) + } + } } diff --git a/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcPortfolioApi.ts b/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcPortfolioApi.ts index 26f4a71c1..7b532fb90 100644 --- a/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcPortfolioApi.ts +++ b/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcPortfolioApi.ts @@ -104,51 +104,4 @@ export class IndexerGrpcAccountPortfolioApi extends BaseGrpcConsumer { }) } } - - async fetchAccountPortfolioTokenHolders({ - denom, - cursor, - limit, - }: { - denom: string - cursor?: string - limit?: number - }) { - const request = InjectivePortfolioRpc.TokenHoldersRequest.create() - - request.denom = denom - - if (cursor) { - request.cursor = cursor - } - - if (limit) { - request.limit = limit - } - - try { - const response = - await this.retry(() => - this.client.TokenHolders(request), - ) - - return IndexerGrpcAccountPortfolioTransformer.tokenHoldersResponseToTokenHolders( - response, - ) - } catch (e: unknown) { - if (e instanceof InjectivePortfolioRpc.GrpcWebError) { - throw new GrpcUnaryRequestException(new Error(e.toString()), { - code: e.code, - context: 'TokenHolders', - contextModule: this.module, - }) - } - - throw new GrpcUnaryRequestException(e as Error, { - code: UnspecifiedErrorCode, - context: 'TokenHolders', - contextModule: this.module, - }) - } - } } diff --git a/packages/sdk-ts/src/client/indexer/transformers/IndexerAccountPortfolioTransformer.ts b/packages/sdk-ts/src/client/indexer/transformers/IndexerAccountPortfolioTransformer.ts index 4f269b2e6..1844c6026 100644 --- a/packages/sdk-ts/src/client/indexer/transformers/IndexerAccountPortfolioTransformer.ts +++ b/packages/sdk-ts/src/client/indexer/transformers/IndexerAccountPortfolioTransformer.ts @@ -1,7 +1,6 @@ import { Coin } from '@injectivelabs/ts-types' import { GrpcCoin } from '../../../types' import { - TokenHolders, PositionsWithUPNL, AccountPortfolioV2, SubaccountDepositV2, @@ -118,16 +117,4 @@ export class IndexerGrpcAccountPortfolioTransformer { : undefined, } } - - static tokenHoldersResponseToTokenHolders( - response: InjectivePortfolioRpc.TokenHoldersResponse, - ): TokenHolders { - return { - holders: response.holders.map((holder) => ({ - accountAddress: holder.accountAddress, - balance: holder.balance, - })), - nextCursors: response.nextCursors, - } - } } diff --git a/packages/sdk-ts/src/client/indexer/transformers/IndexerGrpcArchiverTransformer.ts b/packages/sdk-ts/src/client/indexer/transformers/IndexerGrpcArchiverTransformer.ts index c06390233..04cdaf0b3 100644 --- a/packages/sdk-ts/src/client/indexer/transformers/IndexerGrpcArchiverTransformer.ts +++ b/packages/sdk-ts/src/client/indexer/transformers/IndexerGrpcArchiverTransformer.ts @@ -1,10 +1,11 @@ import { + DenomHolders, HistoricalRPNL, - HistoricalBalance, - HistoricalVolumes, LeaderboardRow, PnlLeaderboard, VolLeaderboard, + HistoricalBalance, + HistoricalVolumes, } from '../types/archiver' import { InjectiveArchiverRpc } from '@injectivelabs/indexer-proto-ts' @@ -133,4 +134,16 @@ export class IndexerGrpcArchiverTransformer { ), } } + + static grpcDenomHoldersResponseToDenomHolders( + response: InjectiveArchiverRpc.DenomHoldersResponse, + ): DenomHolders { + return { + holders: response.holders.map((holder) => ({ + accountAddress: holder.accountAddress, + balance: holder.balance, + })), + next: response.next, + } + } } diff --git a/packages/sdk-ts/src/client/indexer/types/account-portfolio.ts b/packages/sdk-ts/src/client/indexer/types/account-portfolio.ts index 2c2199532..dc80eccaf 100644 --- a/packages/sdk-ts/src/client/indexer/types/account-portfolio.ts +++ b/packages/sdk-ts/src/client/indexer/types/account-portfolio.ts @@ -31,20 +31,9 @@ export interface AccountPortfolioBalances { subaccountsList: PortfolioSubaccountBalanceV2[] } -export interface Holder { - accountAddress: string - balance: string -} - -export interface TokenHolders { - holders: Holder[] - nextCursors: string[] -} - export type GrpcPositionV2 = InjectivePortfolioRpc.DerivativePosition export type GrpcAccountPortfolioV2 = InjectivePortfolioRpc.Portfolio export type GrpcSubaccountDepositV2 = InjectivePortfolioRpc.SubaccountDeposit export type GrpcPositionsWithUPNL = InjectivePortfolioRpc.PositionsWithUPNL export type GrpcPortfolioSubaccountBalanceV2 = InjectivePortfolioRpc.SubaccountBalanceV2 -export type GrpcTokenHolders = InjectivePortfolioRpc.TokenHoldersResponse diff --git a/packages/sdk-ts/src/client/indexer/types/archiver.ts b/packages/sdk-ts/src/client/indexer/types/archiver.ts index b6f4245a9..e29eb49d4 100644 --- a/packages/sdk-ts/src/client/indexer/types/archiver.ts +++ b/packages/sdk-ts/src/client/indexer/types/archiver.ts @@ -34,6 +34,16 @@ export interface VolLeaderboard { leaders: LeaderboardRow[] } +export interface Holder { + accountAddress: string + balance: string +} + +export interface DenomHolders { + holders: Holder[] + next: string[] +} + export type GrpcHistoricalRPNL = InjectiveArchiverRpc.HistoricalRPNL export type GrpcHistoricalBalance = InjectiveArchiverRpc.HistoricalBalance export type GrpcHistoricalVolumes = InjectiveArchiverRpc.HistoricalVolumes @@ -44,3 +54,4 @@ export type GrpcVolLeaderboard = | InjectiveArchiverRpc.VolLeaderboardResponse | InjectiveArchiverRpc.VolLeaderboardFixedResolutionResponse export type GrpcLeaderboardRow = InjectiveArchiverRpc.LeaderboardRow +export type GrpcDenomHolders = InjectiveArchiverRpc.DenomHoldersResponse diff --git a/yarn.lock b/yarn.lock index 7c3bd3a7d..94eb95dd6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2211,10 +2211,10 @@ dependencies: browser-headers "^0.4.1" -"@injectivelabs/indexer-proto-ts@1.11.49": - version "1.11.49" - resolved "https://registry.yarnpkg.com/@injectivelabs/indexer-proto-ts/-/indexer-proto-ts-1.11.49.tgz#cefe5bdc2ffe75754c14a43cb586469eef3f391b" - integrity sha512-CLSYpkYJ12QWgzqA3a1AHO9HoMdz1zMOunf3cee1OtA4EdZGp+0KsenS46gCulzqBB6N6l3si6GbwHzlT2nFZQ== +"@injectivelabs/indexer-proto-ts@1.11.52": + version "1.11.52" + resolved "https://registry.yarnpkg.com/@injectivelabs/indexer-proto-ts/-/indexer-proto-ts-1.11.52.tgz#ed66d6d24269cfa6cc0f327adbbc5ab90cfce1af" + integrity sha512-COUUDtC7BrPuHLT9WZOfrhuBTWlkwG+hFwxOOSt4WNds7tyvpvoOQSB5DlLf+0XQYWu15H1ePjAZ2axWiObeTg== dependencies: "@injectivelabs/grpc-web" "^0.0.1" google-protobuf "^3.14.0" From 9fdd91104d2807f59d162596a96067c8c9775913 Mon Sep 17 00:00:00 2001 From: shane-moore Date: Tue, 10 Sep 2024 11:06:47 -0400 Subject: [PATCH 2/4] feat: explorer stats api --- .../grpc/IndexerGrpcExplorerApi.spec.ts | 19 ++++++++++ .../indexer/grpc/IndexerGrpcExplorerApi.ts | 28 +++++++++++++++ .../IndexerGrpcExplorerTransformer.ts | 36 +++++++++++++------ .../src/client/indexer/types/explorer.ts | 12 +++++++ 4 files changed, 85 insertions(+), 10 deletions(-) diff --git a/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcExplorerApi.spec.ts b/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcExplorerApi.spec.ts index 91e14d10e..803da57fb 100644 --- a/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcExplorerApi.spec.ts +++ b/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcExplorerApi.spec.ts @@ -222,4 +222,23 @@ describe('IndexerGrpcExplorerApi', () => { ) } }) + + test('fetchExplorerStats', async () => { + try { + const response = await indexerGrpcExplorerApi.fetchExplorerStats() + + expect(response).toBeDefined() + expect(response).toEqual( + expect.objectContaining< + ReturnType< + typeof IndexerGrpcExplorerTransformer.getExplorerStatsResponseToExplorerStats + > + >(response), + ) + } catch (e) { + console.error( + 'IndexerGrpcExplorerApi.fetchExplorerStats => ' + (e as any).message, + ) + } + }) }) diff --git a/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcExplorerApi.ts b/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcExplorerApi.ts index 4dd9be3bb..3cd189bf0 100644 --- a/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcExplorerApi.ts +++ b/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcExplorerApi.ts @@ -540,4 +540,32 @@ export class IndexerGrpcExplorerApi extends BaseGrpcConsumer { }) } } + + async fetchExplorerStats() { + const request = InjectiveExplorerRpc.GetStatsRequest.create() + + try { + const response = await this.retry( + () => this.client.GetStats(request), + ) + + return IndexerGrpcExplorerTransformer.getExplorerStatsResponseToExplorerStats( + response, + ) + } catch (e: unknown) { + if (e instanceof InjectiveExplorerRpc.GrpcWebError) { + throw new GrpcUnaryRequestException(new Error(e.toString()), { + code: e.code, + context: 'GetExplorerStats', + contextModule: this.module, + }) + } + + throw new GrpcUnaryRequestException(e as Error, { + code: UnspecifiedErrorCode, + context: 'GetExplorerStats', + contextModule: this.module, + }) + } + } } diff --git a/packages/sdk-ts/src/client/indexer/transformers/IndexerGrpcExplorerTransformer.ts b/packages/sdk-ts/src/client/indexer/transformers/IndexerGrpcExplorerTransformer.ts index a2cd1b184..f514e6dcd 100644 --- a/packages/sdk-ts/src/client/indexer/transformers/IndexerGrpcExplorerTransformer.ts +++ b/packages/sdk-ts/src/client/indexer/transformers/IndexerGrpcExplorerTransformer.ts @@ -1,25 +1,26 @@ import { - BankMsgSendTransaction, Block, - BlockWithTxs, GasFee, - GrpcBankMsgSendMessage, GrpcGasFee, - GrpcIndexerValidatorDescription, - GrpcValidatorSlashingEvent, - GrpcValidatorUptime, Transaction, - ExplorerValidator, - ExplorerValidatorDescription, - ValidatorSlashingEvent, - ValidatorUptime, + BlockWithTxs, IBCTransferTx, + ExplorerStats, PeggyDepositTx, + ValidatorUptime, + ExplorerValidator, PeggyWithdrawalTx, GrpcIBCTransferTx, GrpcPeggyDepositTx, + GrpcValidatorUptime, GrpcPeggyWithdrawalTx, + BankMsgSendTransaction, + GrpcBankMsgSendMessage, + ValidatorSlashingEvent, IndexerStreamTransaction, + GrpcValidatorSlashingEvent, + ExplorerValidatorDescription, + GrpcIndexerValidatorDescription, } from '../types/explorer' import { grpcPagingToPaging } from '../../../utils' import { InjectiveExplorerRpc } from '@injectivelabs/indexer-proto-ts' @@ -395,4 +396,19 @@ export class IndexerGrpcExplorerTransformer { updatedAt: grpcPeggyWithdrawalTx.updatedAt, } } + + static getExplorerStatsResponseToExplorerStats( + response: InjectiveExplorerRpc.GetStatsResponse, + ): ExplorerStats { + return { + assets: response.assets, + txsTotal: response.txsTotal, + addresses: response.addresses, + injSupply: response.injSupply, + txsInPast24Hours: response.txs24H, + blockCountInPast24Hours: response.blockCount24H, + txsPerSecondInPast24Hours: response.txsPs24H, + txsPerSecondInPast100Blocks: response.txsPs100B, + } + } } diff --git a/packages/sdk-ts/src/client/indexer/types/explorer.ts b/packages/sdk-ts/src/client/indexer/types/explorer.ts index 450a68dcc..629232846 100644 --- a/packages/sdk-ts/src/client/indexer/types/explorer.ts +++ b/packages/sdk-ts/src/client/indexer/types/explorer.ts @@ -379,6 +379,17 @@ export interface CosmWasmChecksum { hash: string } +export interface ExplorerStats { + assets: string + txsTotal: string + addresses: string + injSupply: string + txsInPast24Hours: string + blockCountInPast24Hours: string + txsPerSecondInPast24Hours: string + txsPerSecondInPast100Blocks: string +} + export type GrpcIBCTransferTx = InjectiveExplorerRpc.IBCTransferTx export type GrpcPeggyDepositTx = InjectiveExplorerRpc.PeggyDepositTx export type GrpcPeggyWithdrawalTx = InjectiveExplorerRpc.PeggyWithdrawalTx @@ -387,3 +398,4 @@ export type GrpcValidatorUptime = InjectiveExplorerRpc.ValidatorUptime export type GrpcIndexerValidatorDescription = InjectiveExplorerRpc.ValidatorDescription export type GrpcValidatorSlashingEvent = InjectiveExplorerRpc.SlashingEvent +export type GrpcExplorerStats = InjectiveExplorerRpc.GetStatsResponse From c403cab9651f14b66a6e6155479c9e1a8d05d9e7 Mon Sep 17 00:00:00 2001 From: shane-moore Date: Wed, 11 Sep 2024 16:15:55 -0400 Subject: [PATCH 3/4] chore: add 30 days field to stats api --- packages/sdk-ts/package.json | 2 +- .../transformers/IndexerGrpcExplorerTransformer.ts | 1 + packages/sdk-ts/src/client/indexer/types/explorer.ts | 1 + yarn.lock | 8 ++++---- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/sdk-ts/package.json b/packages/sdk-ts/package.json index 4c50d710e..c0bcb5a75 100644 --- a/packages/sdk-ts/package.json +++ b/packages/sdk-ts/package.json @@ -44,7 +44,7 @@ "@injectivelabs/grpc-web": "^0.0.1", "@injectivelabs/grpc-web-node-http-transport": "^0.0.2", "@injectivelabs/grpc-web-react-native-transport": "^0.0.2", - "@injectivelabs/indexer-proto-ts": "1.11.52", + "@injectivelabs/indexer-proto-ts": "1.11.53", "@injectivelabs/mito-proto-ts": "1.0.65", "@injectivelabs/networks": "^1.14.14", "@injectivelabs/test-utils": "^1.14.14", diff --git a/packages/sdk-ts/src/client/indexer/transformers/IndexerGrpcExplorerTransformer.ts b/packages/sdk-ts/src/client/indexer/transformers/IndexerGrpcExplorerTransformer.ts index f514e6dcd..4b20f399b 100644 --- a/packages/sdk-ts/src/client/indexer/transformers/IndexerGrpcExplorerTransformer.ts +++ b/packages/sdk-ts/src/client/indexer/transformers/IndexerGrpcExplorerTransformer.ts @@ -406,6 +406,7 @@ export class IndexerGrpcExplorerTransformer { addresses: response.addresses, injSupply: response.injSupply, txsInPast24Hours: response.txs24H, + txsInPast30Days: response.txs30D, blockCountInPast24Hours: response.blockCount24H, txsPerSecondInPast24Hours: response.txsPs24H, txsPerSecondInPast100Blocks: response.txsPs100B, diff --git a/packages/sdk-ts/src/client/indexer/types/explorer.ts b/packages/sdk-ts/src/client/indexer/types/explorer.ts index 629232846..1c13f604d 100644 --- a/packages/sdk-ts/src/client/indexer/types/explorer.ts +++ b/packages/sdk-ts/src/client/indexer/types/explorer.ts @@ -384,6 +384,7 @@ export interface ExplorerStats { txsTotal: string addresses: string injSupply: string + txsInPast30Days: string txsInPast24Hours: string blockCountInPast24Hours: string txsPerSecondInPast24Hours: string diff --git a/yarn.lock b/yarn.lock index 94eb95dd6..ddaa4b4fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2211,10 +2211,10 @@ dependencies: browser-headers "^0.4.1" -"@injectivelabs/indexer-proto-ts@1.11.52": - version "1.11.52" - resolved "https://registry.yarnpkg.com/@injectivelabs/indexer-proto-ts/-/indexer-proto-ts-1.11.52.tgz#ed66d6d24269cfa6cc0f327adbbc5ab90cfce1af" - integrity sha512-COUUDtC7BrPuHLT9WZOfrhuBTWlkwG+hFwxOOSt4WNds7tyvpvoOQSB5DlLf+0XQYWu15H1ePjAZ2axWiObeTg== +"@injectivelabs/indexer-proto-ts@1.11.53": + version "1.11.53" + resolved "https://registry.yarnpkg.com/@injectivelabs/indexer-proto-ts/-/indexer-proto-ts-1.11.53.tgz#9dba45c5af0c719505090b47cc4cdcd17da0cb8c" + integrity sha512-hc67sPi5Pr0iZO2SLgsk43f+n7f1ZGkx82ux4kXtE61lTuHPRWfweel1zHQfo+bmnD8wO3MKD2TZWTeoWbsyhQ== dependencies: "@injectivelabs/grpc-web" "^0.0.1" google-protobuf "^3.14.0" From 3ef3e14f5e08080a8a0e47e16f161e660b3e01d0 Mon Sep 17 00:00:00 2001 From: shane-moore Date: Wed, 11 Sep 2024 16:25:55 -0400 Subject: [PATCH 4/4] chore: updates per pr review --- .../src/client/indexer/grpc/IndexerGrpcArchiverApi.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcArchiverApi.spec.ts b/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcArchiverApi.spec.ts index fb36f64f4..c1cdfa94f 100644 --- a/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcArchiverApi.spec.ts +++ b/packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcArchiverApi.spec.ts @@ -6,8 +6,8 @@ import { IndexerGrpcArchiverApi } from './IndexerGrpcArchiverApi' const account = mockFactory.injectiveAddress const resolution = '1D' -const startDate = String(1622505600) -const endDate = String(1625097600) +const startDate = '1622505600' +const endDate = '1625097600' const limit = 10 const endpoints = getNetworkEndpoints(Network.MainnetSentry) const indexerGrpcArchiverApi = new IndexerGrpcArchiverApi(endpoints.indexer)