@@ -6,7 +6,7 @@ import { ExplorerValidator } from '../types/index.js'
66import { IndexerGrpcExplorerApi } from './IndexerGrpcExplorerApi.js'
77
88const injectiveAddress = mockFactory . injectiveAddress
9- const endpoints = getNetworkEndpoints ( Network . MainnetSentry )
9+ const endpoints = getNetworkEndpoints ( Network . Devnet1 )
1010const indexerGrpcExplorerApi = new IndexerGrpcExplorerApi ( endpoints . indexer )
1111
1212describe ( 'IndexerGrpcExplorerApi' , ( ) => {
@@ -241,4 +241,66 @@ describe('IndexerGrpcExplorerApi', () => {
241241 )
242242 }
243243 } )
244+
245+ test . only ( 'fetchTxsV2' , async ( ) => {
246+ try {
247+ const response = await indexerGrpcExplorerApi . fetchTxsV2 ( {
248+ perPage : 10 ,
249+ type : 'cosmos.gov.v1beta1.MsgVote,cosmos.gov.v1.MsgVote' ,
250+ } )
251+
252+ const { data : txs } = response
253+
254+ expect ( response ) . toBeDefined ( )
255+
256+ expect ( txs ) . toBeDefined ( )
257+ expect ( txs ) . toEqual ( expect . objectContaining < typeof txs > ( txs ) )
258+ } catch ( e ) {
259+ console . error ( 'IndexerGrpcExplorerApi.fetchTxV2 => ' + ( e as any ) . message )
260+ }
261+ } )
262+
263+ test ( 'fetchAccountTxsV2' , async ( ) => {
264+ try {
265+ const response = await indexerGrpcExplorerApi . fetchAccountTxsV2 ( {
266+ address : 'inj17gkuet8f6pssxd8nycm3qr9d9y699rupv6397z' ,
267+ perPage : 10 ,
268+ } )
269+
270+ expect ( response ) . toBeDefined ( )
271+ } catch ( e ) {
272+ console . error (
273+ 'IndexerGrpcExplorerApi.fetchAccountTxsV2 => ' + ( e as any ) . message ,
274+ )
275+ }
276+ } )
277+
278+ test ( 'fetchBlocksV2' , async ( ) => {
279+ try {
280+ const response = await indexerGrpcExplorerApi . fetchBlocksV2 ( {
281+ perPage : 10 ,
282+ } )
283+
284+ expect ( response ) . toBeDefined ( )
285+ } catch ( e ) {
286+ console . error (
287+ 'IndexerGrpcExplorerApi.fetchBlocksV2 => ' + ( e as any ) . message ,
288+ )
289+ }
290+ } )
291+
292+ test ( 'fetchContractTxsV2' , async ( ) => {
293+ try {
294+ const response = await indexerGrpcExplorerApi . fetchContractTxsV2 ( {
295+ contractAddress : 'inj1qk00h5atutpsv900x202pxx42npjr9thrzhgxn' ,
296+ perPage : 10 ,
297+ } )
298+
299+ expect ( response ) . toBeDefined ( )
300+ } catch ( e ) {
301+ console . error (
302+ 'IndexerGrpcExplorerApi.fetchContractTxsV2 => ' + ( e as any ) . message ,
303+ )
304+ }
305+ } )
244306} )
0 commit comments