diff --git a/packages/sdk-ts/src/client/indexer/transformers/IndexerRestExplorerTransformer.ts b/packages/sdk-ts/src/client/indexer/transformers/IndexerRestExplorerTransformer.ts index 731f28d67..99dee7af5 100644 --- a/packages/sdk-ts/src/client/indexer/transformers/IndexerRestExplorerTransformer.ts +++ b/packages/sdk-ts/src/client/indexer/transformers/IndexerRestExplorerTransformer.ts @@ -225,6 +225,8 @@ export class IndexerRestExplorerTransformer { height: transaction.block_number, time: transaction.block_unix_timestamp, type: transaction.messages[0].type, + logs: transaction.logs, + signatures: transaction.signatures, fee: transaction.gas_fee.amount ? new BigNumberInWei(transaction.gas_fee.amount[0].amount).toBase() : ZERO_IN_BASE, diff --git a/packages/sdk-ts/src/client/indexer/types/explorer-rest.ts b/packages/sdk-ts/src/client/indexer/types/explorer-rest.ts index c096680ea..2076b7c16 100644 --- a/packages/sdk-ts/src/client/indexer/types/explorer-rest.ts +++ b/packages/sdk-ts/src/client/indexer/types/explorer-rest.ts @@ -1,8 +1,10 @@ /* eslint-disable camelcase */ import { + EventLog, + Signature, + ValidatorUptime, BlockWithTxs as BaseBlockWithTxs, Transaction as BaseTransaction, - ValidatorUptime, } from './explorer' export enum AccessTypeCode { @@ -37,28 +39,11 @@ export interface ExplorerApiResponseWithPagination { } } -export interface EventLogEvent { - type: string - attributes: Array<{ - key: string - value: string - }> -} - -export interface EventLog { - events: EventLogEvent[] -} - export interface TransactionFromExplorerApiResponse { id: string block_number: number block_timestamp: string - signatures: Array<{ - pubkey: string - address: string - signature: string - sequence: number - }> + signatures: Signature[] tx_type: string hash: string code: number @@ -216,6 +201,8 @@ export interface ContractTransactionExplorerApiResponse { } }, ] + logs: EventLog[] + signatures: Signature[] } export interface CW20BalanceExplorerApiResponse { diff --git a/packages/sdk-ts/src/client/indexer/types/explorer.ts b/packages/sdk-ts/src/client/indexer/types/explorer.ts index fd13cec80..22b42abd2 100644 --- a/packages/sdk-ts/src/client/indexer/types/explorer.ts +++ b/packages/sdk-ts/src/client/indexer/types/explorer.ts @@ -4,6 +4,25 @@ import { InjectiveExplorerRpc } from '@injectivelabs/indexer-proto-ts' import { Coin } from '@injectivelabs/ts-types' import { TokenStatic } from '../../../types/token' +export interface EventLogEvent { + type: string + attributes: Array<{ + key: string + value: string + }> +} + +export interface EventLog { + events: EventLogEvent[] +} + +export interface Signature { + pubkey: string + address: string + signature: string + sequence: number +} + export interface IBCTransferTx { sender: string receiver: string @@ -113,14 +132,9 @@ export interface Transaction { attributes: Record }> txType: string - signatures: Array<{ - pubkey: string - address: string - sequence: number - signature: string - }> + signatures: Signature[] codespace: string - messages?: Array + messages?: TxMessage[] errorLog?: string } @@ -267,6 +281,8 @@ export interface ContractTransaction { memo: string tx_number: number error_log: string + logs: EventLog[] + signatures: Signature[] } export interface ContractTransactionWithMessages extends ContractTransaction {