From b5f0a8ec8b8ff121ab0598b968a8bdb0faece455 Mon Sep 17 00:00:00 2001 From: crypto-matto Date: Wed, 31 Jul 2024 03:29:20 +0900 Subject: [PATCH 1/5] feat: update ETH indexing --- src/config/StaticAssets.ts | 4 +- src/service/TransactionHistoryService.ts | 32 ++++++------ src/service/ethereum/EthClient.ts | 58 +++++++++++++++++++-- src/service/rpc/interface/eth.chainIndex.ts | 1 + src/service/rpc/models/eth.models.ts | 46 ++++++++++------ 5 files changed, 104 insertions(+), 37 deletions(-) diff --git a/src/config/StaticAssets.ts b/src/config/StaticAssets.ts index 9357cea7c..9f5fcf38f 100644 --- a/src/config/StaticAssets.ts +++ b/src/config/StaticAssets.ts @@ -235,8 +235,8 @@ export const ETH_ASSET = (walletConfig: WalletConfig) => { fee: { gasLimit: '50000', networkFee: '20000000000' }, indexingUrl: isTestnet - ? 'https://eth-indexing.crypto.org/ethereum/goerli/api/v1' - : 'https://eth-indexing.crypto.org/ethereum/mainnet/api/v1', + ? 'https://eth-indexing.crypto.org/ethereum/goerli/api/v2' + : 'https://eth-indexing.crypto.org/ethereum/mainnet/api/v2', isLedgerSupportDisabled: false, isStakingDisabled: false, nodeUrl: isTestnet diff --git a/src/service/TransactionHistoryService.ts b/src/service/TransactionHistoryService.ts index 277b4c93c..ee1595f2f 100644 --- a/src/service/TransactionHistoryService.ts +++ b/src/service/TransactionHistoryService.ts @@ -40,6 +40,7 @@ import { croMarketPriceApi } from './rpc/MarketApi'; import { CronosNftIndexingAPI } from './rpc/indexing/nft/cronos/CronosNftIndexingAPI'; import { checkIfTestnet, + getAllERC20WhiteListedAddress, getCronosEvmAsset, isCRC20AssetWhitelisted, isERC20AssetWhitelisted, @@ -334,18 +335,19 @@ export class TransactionHistoryService { const txList = await ethClient.getTxsByAddress(currentAsset.address); const loadedTxList = txList - .filter( - tx => - tx.token_symbol === 'ETH' && - (tx.type?.toLowerCase() === EthereumTransactionType.TRANSFER || - tx.type?.toLowerCase() === EthereumTransactionType.UTF8TRANSFER), - ) + // .filter( + // tx => + // tx.method_id === '' + // // tx.token_symbol === 'ETH' && + // // (tx.type?.toLowerCase() === EthereumTransactionType.TRANSFER || + // // tx.type?.toLowerCase() === EthereumTransactionType.UTF8TRANSFER), + // ) .map(tx => { const transferTx: TransferTransactionData = { - amount: tx.amount, - assetSymbol: tx.token_symbol, + amount: tx.value, + assetSymbol: 'ETH', date: new Date(Number(tx.timestamp) * 1000).toISOString(), - hash: tx.transaction_hash, + hash: tx.hash, memo: '', receiverAddress: tx.to, senderAddress: tx.from, @@ -356,7 +358,7 @@ export class TransactionHistoryService { walletId: walletIdentifier, assetId: currentAsset.identifier, assetType: currentAsset.assetType, - txHash: tx.transaction_hash, + txHash: tx.hash, txType: EthereumTransactionType.TRANSFER, txData: transferTx, // TODO: add messageTypeName @@ -860,9 +862,9 @@ export class TransactionHistoryService { const ethClient = new EthClient(ethEvmAsset.config?.nodeUrl, ethEvmAsset.config?.indexingUrl); - // const allWhiteListedTokens = getAllERC20WhiteListedAddress(); + const allWhiteListedTokens = getAllERC20WhiteListedAddress(); const tokensListResponse = await ethClient.getBalanceByAddress(address, { - // token: allWhiteListedTokens.slice(0, 20).join(','), + contract_addresses: allWhiteListedTokens.slice(0, 20).join(','), }); const newlyLoadedTokens = await tokensListResponse .filter(token => token.balance > 0 && token.token_addr !== 'ETH') @@ -941,9 +943,9 @@ export class TransactionHistoryService { if (asset.name.includes('Cronos')) { await this.fetchCurrentWalletCRC20Tokens(asset, currentSession); } - if (asset.name.includes('Ethereum')) { - await this.fetchCurrentWalletERC20Tokens(asset, currentSession); - } + // if (asset.name.includes('Ethereum')) { + // await this.fetchCurrentWalletERC20Tokens(asset, currentSession); + // } break; default: break; diff --git a/src/service/ethereum/EthClient.ts b/src/service/ethereum/EthClient.ts index ecdc39fee..d6653bcef 100644 --- a/src/service/ethereum/EthClient.ts +++ b/src/service/ethereum/EthClient.ts @@ -41,7 +41,7 @@ export class EthClient extends EVMClient implements IEthChainIndexAPI { getETHBalanceByAddress = async (address: string): Promise => { const balanceResponse: AxiosResponse = await axios({ baseURL: this.indexingBaseUrl, - url: `/address/${address.toLowerCase()}/balance`, + url: `/addresses/${address.toLowerCase()}/native_balance`, }); if (balanceResponse.status !== 200) { @@ -62,7 +62,7 @@ export class EthClient extends EVMClient implements IEthChainIndexAPI { getBalanceByAddress = async (address: string, options?: balanceQueryBaseParams) => { const balanceResponse: AxiosResponse = await axios({ baseURL: this.indexingBaseUrl, - url: `/address/${address.toLowerCase()}/balance`, + url: `/addresses/${address.toLowerCase()}/token_balance`, params: { ...options }, }); @@ -79,7 +79,7 @@ export class EthClient extends EVMClient implements IEthChainIndexAPI { getTxsByAddress = async (address: string, options?: txQueryBaseParams) => { // Pagination params - let currentPage = options?.page || 0; + let currentPage = options?.page || 1; const limit = options?.pageSize || 100; // Result @@ -111,7 +111,7 @@ export class EthClient extends EVMClient implements IEthChainIndexAPI { private getTxsByAddressPaginated = async (address: string, options?: txQueryBaseParams) => { const txListResponse: AxiosResponse = await axios({ baseURL: this.indexingBaseUrl, - url: `/address/${address.toLowerCase()}/normal`, + url: `/addresses/${address.toLowerCase()}/transactions`, params: { ...options }, }); @@ -134,4 +134,54 @@ export class EthClient extends EVMClient implements IEthChainIndexAPI { getInternalTxsByAddress(address: string, options?: any) { throw new Error('Method not implemented.'); } + + + getERC20TransfersByAddress = async (address: string, options?: txQueryBaseParams) => { + // Pagination params + let currentPage = options?.page || 1; + const limit = options?.pageSize || 100; + + // Result + const finalList: TransactionData[] = []; + + // eslint-disable-next-line no-constant-condition + while (true) { + // eslint-disable-next-line + const txDataList = await this.getERC20TransfersByAddressPaginated(address, { + pageSize: limit, + page: currentPage, + sort: 'timestamp:desc', + }); + + // Append TxData list to the final response array + finalList.push(...txDataList); + + // Increment pagination params + currentPage += 1; + + if (txDataList.length < 1 || txDataList.length < limit) { + break; + } + } + + return finalList; + }; + + private getERC20TransfersByAddressPaginated = async (address: string, options?: txQueryBaseParams) => { + const txListResponse: AxiosResponse = await axios({ + baseURL: this.indexingBaseUrl, + url: `/addresses/${address.toLowerCase()}/transfers`, + params: { ...options }, + }); + + if (txListResponse.status !== 200) { + return []; + } + + if (!txListResponse.data.data) { + return []; + } + + return txListResponse.data.data as TransactionData[]; + }; } diff --git a/src/service/rpc/interface/eth.chainIndex.ts b/src/service/rpc/interface/eth.chainIndex.ts index c87d1809b..a1c8b4452 100644 --- a/src/service/rpc/interface/eth.chainIndex.ts +++ b/src/service/rpc/interface/eth.chainIndex.ts @@ -14,6 +14,7 @@ export interface txQueryBaseParams { export interface balanceQueryBaseParams { token?: string; apikey?: string; + contract_addresses: string; } export interface IEthChainIndexAPI { diff --git a/src/service/rpc/models/eth.models.ts b/src/service/rpc/models/eth.models.ts index c8cc4d7fd..41f49efbf 100644 --- a/src/service/rpc/models/eth.models.ts +++ b/src/service/rpc/models/eth.models.ts @@ -22,22 +22,36 @@ export interface TransactionsByAddressResponse { } export interface TransactionData { - transaction_hash: string; - signer: string[]; + block_hash: string; + block_number: number; + call_error: string; + contract_creation: boolean; from: string; - to: string; - amount: string; - decimal: number; - token_addr: string; - token_name: string; - token_symbol: string; - type: string; - failed: boolean; - fail_reason: null; - timestamp: string; - block: number; - transaction_index: number; - log_index: number; - gas_price: number; + from_metadata: { + is_contract: boolean; + } + gas_limit: number; + gas_price: string; gas_used: number; + hash: string; + index: number; + method_id: string; + method_name: string; + nonce: number; + status: number; + timestamp: number; + to: string; + to_metadata: { + is_contract: boolean; + } + type: number; + value: string; + decimal?: number; + fail_reason?: null; + failed?: boolean; + log_index?: number; + signer?: string[]; + token_addr?: string; + token_name?: string; + token_symbol?: string; } From d7b7cd68466ac472adace23806da432cf7428708 Mon Sep 17 00:00:00 2001 From: crypto-matto Date: Wed, 31 Jul 2024 03:35:47 +0900 Subject: [PATCH 2/5] feat: update default configs --- src/config/StaticAssets.ts | 4 ++-- src/layouts/home/home.tsx | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/config/StaticAssets.ts b/src/config/StaticAssets.ts index 9f5fcf38f..14711cee4 100644 --- a/src/config/StaticAssets.ts +++ b/src/config/StaticAssets.ts @@ -11,9 +11,9 @@ import { TestNetCroeseid5Config, MainNetConfig } from './StaticConfig'; export const STATIC_ASSET_COUNT = 4; // Update Explorer Url - https://cronoscan.com -export const MAINNET_EVM_EXPLORER_URL = 'https://cronoscan.com'; +export const MAINNET_EVM_EXPLORER_URL = 'https://explorer.cronos.org'; // There's no testnet explorer on cronoscan.com. Use cronos.org/explorer instead. -export const TESTNET_EVM_EXPLORER_URL = 'https://cronos.org/explorer/testnet3'; +export const TESTNET_EVM_EXPLORER_URL = 'https://explorer.cronos.org/testnet'; export const MAINNET_ETHEREUM_EXPLORER_URL = 'https://etherscan.io'; export const ROPSTEN_ETHEREUM_EXPLORER_URL = 'https://ropsten.etherscan.io'; diff --git a/src/layouts/home/home.tsx b/src/layouts/home/home.tsx index 651b9bf5d..3fcc340cf 100644 --- a/src/layouts/home/home.tsx +++ b/src/layouts/home/home.tsx @@ -345,8 +345,6 @@ function HomeLayout(props: HomeLayoutProps) { : MAINNET_ETHEREUM_EXPLORER_URL; setTimeout(async () => { - - console.log('checkCorrectExplorerUrl', cronosTendermintAsset?.config?.explorerUrl, checkDefaultCronosPosExplorerUrl); if ( !walletSession.activeAsset?.config?.explorer || // Check if explorerUrl has been updated with latest default From 2c900db8203f957b348ae741b5d44e6c8cbfd28b Mon Sep 17 00:00:00 2001 From: crypto-matto Date: Wed, 31 Jul 2024 03:39:04 +0900 Subject: [PATCH 3/5] feat: update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57ee7c25a..a7bd20dfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file. ### Additions - Security enhancement on DApp Browser - web3 library dependencies bump +- Transit to upgraded indexing services ## [v1.5.0] - 2024-03-12 ### Additions - Security enhancement on DApp Browser From 865e7fedb984e41eb60b9be4c7128888c79321b6 Mon Sep 17 00:00:00 2001 From: crypto-matto Date: Wed, 31 Jul 2024 03:46:28 +0900 Subject: [PATCH 4/5] feat: update balanceQueryBaseParams --- src/service/rpc/interface/eth.chainIndex.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/service/rpc/interface/eth.chainIndex.ts b/src/service/rpc/interface/eth.chainIndex.ts index a1c8b4452..29256a2db 100644 --- a/src/service/rpc/interface/eth.chainIndex.ts +++ b/src/service/rpc/interface/eth.chainIndex.ts @@ -15,6 +15,9 @@ export interface balanceQueryBaseParams { token?: string; apikey?: string; contract_addresses: string; + page?: number | 1; + pageSize?: number | 10; + session?: string; } export interface IEthChainIndexAPI { From 932649aec128925fa75d49f47e276d57dde31261 Mon Sep 17 00:00:00 2001 From: crypto-matto Date: Wed, 31 Jul 2024 04:31:48 +0900 Subject: [PATCH 5/5] fix: ci --- src/service/ethereum/EthClient.spec.ts | 51 ------- src/service/ethereum/EthClient.ts | 1 - src/service/ethereum/test.data.ts | 197 ++++++++++++++++++------- 3 files changed, 142 insertions(+), 107 deletions(-) delete mode 100644 src/service/ethereum/EthClient.spec.ts diff --git a/src/service/ethereum/EthClient.spec.ts b/src/service/ethereum/EthClient.spec.ts deleted file mode 100644 index 014edd3ed..000000000 --- a/src/service/ethereum/EthClient.spec.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * @jest-environment node - */ -/* eslint-disable */ -import 'mocha'; -import axios from 'axios'; -import MockAdapter from 'axios-mock-adapter'; -import { expect } from 'chai'; -import { EthClient } from './EthClient'; -import { successfulCallData, txListStubSuccessful, txListStubEmpty } from './test.data'; - -describe('EthClient', () => { - let axiosMock: MockAdapter; - - beforeEach(() => { - axiosMock = new MockAdapter(axios, { onNoMatch: 'throwException' }); - }); - - afterEach(() => { - axiosMock.reset(); - }); - it('should return transaction list from blockchain chainIndexAPI ', async () => { - axiosMock - .onGet('/address/0xa976a66bfcbd5d71e6d0b7a0a3a9aa8eaa1b377a/normal', { - params: { pageSize: 5, page: 0, sort: 'timestamp:desc' }, - }) - .replyOnce(200, txListStubSuccessful) - .onGet('/address/0xa976a66bfcbd5d71e6d0b7a0a3a9aa8eaa1b377a/normal', { - params: { pageSize: 5, page: 1, sort: 'timestamp:desc' }, - }) - .replyOnce(200, txListStubEmpty); - - const ethClientApi = new EthClient( - 'https://eth-indexing.crypto.org/ethereum/mainnet/rpc', - 'https://eth-indexing.crypto.org/ethereum/mainnet/api/v1', - ); - - const txDataList = await ethClientApi.getTxsByAddress( - '0xa976a66bfcbd5d71e6d0b7a0a3a9aa8eaa1b377a', - { pageSize: 5, page: 0, sort: 'timestamp:desc' }, - ); - - expect(txDataList).to.have.length(3); - expect(txDataList[0].transaction_hash).to.equal( - '0xf52854006893ba8c0575d7f5306a4648e084ae608fb81559a9f4cf82e6b674e9', - ); - expect(txDataList[1].transaction_hash).to.equal( - '0x12083dc618d64018911a30775e5ad8e95110666ffbcd51afe22f6ee3f4f31fba', - ); - }); -}); diff --git a/src/service/ethereum/EthClient.ts b/src/service/ethereum/EthClient.ts index d6653bcef..0ea170e4b 100644 --- a/src/service/ethereum/EthClient.ts +++ b/src/service/ethereum/EthClient.ts @@ -91,7 +91,6 @@ export class EthClient extends EVMClient implements IEthChainIndexAPI { const txDataList = await this.getTxsByAddressPaginated(address, { pageSize: limit, page: currentPage, - sort: 'timestamp:desc', }); // Append TxData list to the final response array diff --git a/src/service/ethereum/test.data.ts b/src/service/ethereum/test.data.ts index 7cbed295e..c30a015a1 100644 --- a/src/service/ethereum/test.data.ts +++ b/src/service/ethereum/test.data.ts @@ -59,68 +59,155 @@ export const successfulCallData = [ export const emptyCallsData = []; export const txListStubSuccessful = { + 'page': 1, + 'page_size': 5, + 'session': 'CAEQBRpnCLW13gkSYENrQTNNMkV3TkRjME1XSXdabUU1WXpsbE16azFaRGsxTWpWalptUm1OamswTXprNVpUTmxZak14TldFeU5XTm1ZakEzTXpka05ETmhOekE1Wm1Kak1UQXdFZ0lBY2c9PQ==', + 'total': 114, 'data': [ { - 'transaction_hash': '0xf52854006893ba8c0575d7f5306a4648e084ae608fb81559a9f4cf82e6b674e9', - 'signer': ['0xadb2b42f6bd96f5c65920b9ac88619dce4166f94'], - 'from': ['0xadb2b42f6bd96f5c65920b9ac88619dce4166f94'], - 'to': '0x01fb1eab628fd4389b2f0cbb63f4bb66c1a966e2', - 'amount': '123123123123123', - 'decimal': 18, - 'token_addr': '0xdac17f958d2ee523a2206206994597c13d831ec7', - 'token_name': 'USDT', - 'token_symbol': 'Tether', - 'type': 'transfer', - 'failed': false, - 'fail_reason': null, - 'timestamp': '1646803996', - 'block': 123123, - 'transaction_index': 0, - 'log_index': 0, - 'gas_price': 100, - 'gas_used': 52380 + 'block_hash': '0x5cf3b95ea84469c5d44ed71479f7d58c7bc38ad5cf4474adf7939233954bc32d', + 'block_number': 18984056, + 'timestamp': 1704980603, + 'hash': '0x938ae00f6f7e14d6ca635a4d11610d05c8ed57e7720fa28b421071ef8d2aae83', + 'type': 2, + 'nonce': 100, + 'method_id': '0x095ea7b3', + 'method_name': '', + 'from': '0xa976a66bfcbd5d71e6d0b7a0a3a9aa8eaa1b377a', + 'from_metadata': { + 'is_contract': false + }, + 'to': '0x15b7c0c907e4c6b9adaaaabc300c08991d6cea05', + 'to_metadata': { + 'is_contract': true + }, + 'index': 105, + 'value': '0', + 'gas_price': '30013910717', + 'gas_limit': 120000, + 'gas_used': 47047, + 'status': 1, + 'contract_creation': false, + 'call_error': '', + 'cumulative_gas_used': 9719388, + 'input': '0x095ea7b3000000000000000000000000881d40237659c251811cec9c364ef91dc08d300cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' }, { - 'transaction_hash': '0x12083dc618d64018911a30775e5ad8e95110666ffbcd51afe22f6ee3f4f31fba', - 'signer': ['0xadb2b42f6bd96f5c65920b9ac88619dce4166f94'], - 'from': ['0xadb2b42f6bd96f5c65920b9ac88619dce4166f94'], - 'to': '0x01fb1eab628fd4389b2f0cbb63f4bb66c1a966e2', - 'amount': '123123', - 'decimal': 18, - 'token_addr': 'ETH', - 'token_name': 'ETH', - 'token_symbol': 'Ethereum', - 'type': 'transfer', - 'failed': false, - 'fail_reason': null, - 'timestamp': '1646803997', - 'block': 123123, - 'transaction_index': 0, - 'log_index': 0, - 'gas_price': 100, - 'gas_used': 52380 + 'block_hash': '0x5cf3b95ea84469c5d44ed71479f7d58c7bc38ad5cf4474adf7939233954bc32d', + 'block_number': 18984056, + 'timestamp': 1704980603, + 'hash': '0xb4678654a98300ddabeab2fa29018ed54a11c9aaca853c23bf51868f80d6eb82', + 'type': 2, + 'nonce': 101, + 'method_id': '0x5f575529', + 'method_name': '', + 'from': '0xa976a66bfcbd5d71e6d0b7a0a3a9aa8eaa1b377a', + 'from_metadata': { + 'is_contract': false + }, + 'to': '0x881d40237659c251811cec9c364ef91dc08d300c', + 'to_metadata': { + 'is_contract': true + }, + 'index': 161, + 'value': '0', + 'gas_price': '30013910717', + 'gas_limit': 236058, + 'gas_used': 187999, + 'status': 1, + 'contract_creation': false, + 'call_error': '', + 'cumulative_gas_used': 13854993, + 'input': '0x5f575529000000000000000000000000000000000000000000000000000000000000008000000000000000000000000015b7c0c907e4c6b9adaaaabc300c08991d6cea0500000000000000000000000000000000000000000000001cd6fbad57dbd0000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000136f6e65496e6368563546656544796e616d69630000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000015b7c0c907e4c6b9adaaaabc300c08991d6cea05000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001cd6fbad57dbd0000000000000000000000000000000000000000000000000000001d78820067ad527000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000043f4cfb7e21be000000000000000000000000f326e4de8f66a0bdc0970b79e0924e33c79f1915000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a8e449022e00000000000000000000000000000000000000000000001cd6fbad57dbd0000000000000000000000000000000000000000000000000000001dbb1ae072ec304000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000012000000000000000000000002dd31cc03ed996a99fbfdffa07f8f4604b1a2ec1ab4991fe0000000000000000000000000000000000000000000000000094' }, { - 'transaction_hash': '0xf52854006893ba8c0575d7f5306a4648e084ae608fb81559a9f4cf82e6b674e9', - 'signer': ['0xadb2b42f6bd96f5c65920b9ac88619dce4166f94'], - 'from': ['0xadb2b42f6bd96f5c65920b9ac88619dce4166f94'], - 'to': '0x01fb1eab628fd4389b2f0cbb63f4bb66c1a966e2', - 'amount': '123123', - 'decimal': 18, - 'token_addr': 'ETH', - 'token_name': 'ETH', - 'token_symbol': 'Ethereum', - 'type': 'transfer', - 'failed': false, - 'fail_reason': null, - 'timestamp': '1646803998', - 'block': 123123, - 'transaction_index': 0, - 'log_index': 0, - 'gas_price': 100, - 'gas_used': 52380 + 'block_hash': '0x6e487cda1dfbeba8e89e2f123e1569464cf4414832f95dc8e12f2238411c7501', + 'block_number': 18984044, + 'timestamp': 1704980459, + 'hash': '0x0f56b6f226193a71f80e281e35b266474bd11b0aa2ed52d703a42341f4a4cd5d', + 'type': 2, + 'nonce': 99, + 'method_id': '0x1114cd2a', + 'method_name': '', + 'from': '0xa976a66bfcbd5d71e6d0b7a0a3a9aa8eaa1b377a', + 'from_metadata': { + 'is_contract': false + }, + 'to': '0x150f94b44927f078737562f0fcf3c95c01cc2376', + 'to_metadata': { + 'is_contract': true + }, + 'index': 118, + 'value': '51141530653244501', + 'gas_price': '29526358266', + 'gas_limit': 449150, + 'gas_used': 383976, + 'status': 1, + 'contract_creation': false, + 'call_error': '', + 'cumulative_gas_used': 17276841, + 'input': '0x1114cd2a000000000000000000000000000000000000000000000000000000000000006f000000000000000000000000a976a66bfcbd5d71e6d0b7a0a3a9aa8eaa1b377a00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000b1a2bc2ec5000000000000000000000000000000000000000000000000000000b0bf5c859360000000000000000000000000000000000000000000000000000000000000000014a976a66bfcbd5d71e6d0b7a0a3a9aa8eaa1b377a000000000000000000000000' + }, + { + 'block_hash': '0x68990c64d1b3b7e5d9951e4a7f0be53cab6e939e54c2a72e2a5ca2ea79584c3a', + 'block_number': 18983573, + 'timestamp': 1704974783, + 'hash': '0x265e9552f04ad434ee0c3645fe12c60817fcc429397a1ccb186c943117f74259', + 'type': 2, + 'nonce': 98, + 'method_id': '0x5f575529', + 'method_name': '', + 'from': '0xa976a66bfcbd5d71e6d0b7a0a3a9aa8eaa1b377a', + 'from_metadata': { + 'is_contract': false + }, + 'to': '0x881d40237659c251811cec9c364ef91dc08d300c', + 'to_metadata': { + 'is_contract': true + }, + 'index': 54, + 'value': '0', + 'gas_price': '27706163312', + 'gas_limit': 293323, + 'gas_used': 240666, + 'status': 1, + 'contract_creation': false, + 'call_error': '', + 'cumulative_gas_used': 7137698, + 'input': '0x5f5755290000000000000000000000000000000000000000000000000000000000000080000000000000000000000000c18360217d8f7ab5e7c516566761ea12ce7f9d720000000000000000000000000000000000000000000000014d1120d7b160000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000f706d6d46656544796e616d6963763400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000c18360217d8f7ab5e7c516566761ea12ce7f9d7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014d1120d7b160000000000000000000000000000000000000000000000000000002e2c03177adc405000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000062dc91d2ff7e4000000000000000000000000f326e4de8f66a0bdc0970b79e0924e33c79f1915000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000c18360217d8f7ab5e7c516566761ea12ce7f9d7200000000000000000000000000000000000000000000000002f8019319ebbab00000000000000000000000000000000000000000000000014d1120d7b1600000000000000000000000000000a69babef1ca67a37ffaf7a485dfff3382056e78c00000000000000000000000074de5d4fcbf63e00296fd95d33236b9794016631000000000000000000000000a976a66bfcbd5d71e6d0b7a0a3a9aa8eaa1b377a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000659fda1901ffffffffffffffffffffffffffffffffffffff21ae8120659fd983000000330000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000001c4bd77f2df462739edc37387490921ba4cc035d9822fa04c117560b09a7aadee12753560ccf15774283f6e5985ae1cc0d51ed0c36eac94505cefcac4f26c6807f0000000000000000000000000000000000000000000000014d1120d7b16000000059' + }, + { + 'block_hash': '0x13a4f1a6f8eb6c79cee3b84aaa56b23d12d2e3aa7796d31b3eb379f81df88028', + 'block_number': 18983572, + 'timestamp': 1704974771, + 'hash': '0x852b3265ffa5c3d6265be1dd7f64b3fce77941593a44bbf056893694b8bf7ea5', + 'type': 2, + 'nonce': 97, + 'method_id': '0x095ea7b3', + 'method_name': '', + 'from': '0xa976a66bfcbd5d71e6d0b7a0a3a9aa8eaa1b377a', + 'from_metadata': { + 'is_contract': false + }, + 'to': '0xc18360217d8f7ab5e7c516566761ea12ce7f9d72', + 'to_metadata': { + 'is_contract': true + }, + 'index': 100, + 'value': '0', + 'gas_price': '28184521346', + 'gas_limit': 120000, + 'gas_used': 47261, + 'status': 1, + 'contract_creation': false, + 'call_error': '', + 'cumulative_gas_used': 7681615, + 'input': '0x095ea7b3000000000000000000000000881d40237659c251811cec9c364ef91dc08d300cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' } - ] + ], + 'metadata': { + 'response_limit': 10000 + } }; export const txListStubEmpty = {