Skip to content

Commit

Permalink
L2 batches changes (#2313)
Browse files Browse the repository at this point in the history
Fixes #2266
  • Loading branch information
tom2drum authored Oct 22, 2024
1 parent d701d04 commit 6095da7
Show file tree
Hide file tree
Showing 35 changed files with 37 additions and 39 deletions.
4 changes: 2 additions & 2 deletions lib/metadata/templates/title.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ const TEMPLATE_MAP: Record<Route['pathname'], string> = {
'/deposits': '%network_name% deposits (L1 > L2)',
'/output-roots': '%network_name% output roots',
'/dispute-games': '%network_name% dispute games',
'/batches': '%network_name% tx batches (L2 blocks)',
'/batches/[number]': '%network_name% L2 tx batch %number%',
'/batches': '%network_name% txn batches',
'/batches/[number]': '%network_name% L2 txn batch %number%',
'/blobs/[hash]': '%network_name% blob %hash% details',
'/ops': 'User operations on %network_name% - %network_name% explorer',
'/op/[hash]': '%network_name% user operation %hash%',
Expand Down
4 changes: 2 additions & 2 deletions lib/mixpanel/getPageType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export const PAGE_TYPE_DICT: Record<Route['pathname'], string> = {
'/deposits': 'Deposits (L1 > L2)',
'/output-roots': 'Output roots',
'/dispute-games': 'Dispute games',
'/batches': 'Tx batches (L2 blocks)',
'/batches/[number]': 'L2 tx batch details',
'/batches': 'Txn batches',
'/batches/[number]': 'L2 txn batch details',
'/blobs/[hash]': 'Blob details',
'/ops': 'User operations',
'/op/[hash]': 'User operation details',
Expand Down
4 changes: 2 additions & 2 deletions ui/pages/ArbitrumL2TxnBatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const ArbitrumL2TxnBatch = () => {
}

return {
label: 'Back to tx batches list',
label: 'Back to txn batches list',
url: appProps.referrer,
};
}, [ appProps.referrer ]);
Expand All @@ -117,7 +117,7 @@ const ArbitrumL2TxnBatch = () => {
<>
<TextAd mb={ 6 }/>
<PageTitle
title={ `Tx batch #${ number }` }
title={ `Txn batch #${ number }` }
backLink={ backLink }
/>
{ batchQuery.isPlaceholderData ?
Expand Down
7 changes: 3 additions & 4 deletions ui/pages/ArbitrumL2TxnBatches.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Hide, Show, Skeleton, Text } from '@chakra-ui/react';
import React from 'react';

import useApiQuery from 'lib/api/useApiQuery';
import { nbsp } from 'lib/html-entities';
import { ARBITRUM_L2_TXN_BATCHES_ITEM } from 'stubs/arbitrumL2';
import { generateListStub } from 'stubs/utils';
import { ACTION_BAR_HEIGHT_DESKTOP } from 'ui/shared/ActionBar';
Expand Down Expand Up @@ -60,7 +59,7 @@ const ArbitrumL2TxnBatches = () => {

return (
<Skeleton isLoaded={ !countersQuery.isPlaceholderData && !isPlaceholderData } display="flex" flexWrap="wrap">
Tx batch (L2 block)
Txn batch
<Text fontWeight={ 600 } whiteSpace="pre"> #{ data.items[0].number } </Text>to
<Text fontWeight={ 600 } whiteSpace="pre"> #{ data.items[data.items.length - 1].number } </Text>
(total of { countersQuery.data?.toLocaleString() } batches)
Expand All @@ -72,11 +71,11 @@ const ArbitrumL2TxnBatches = () => {

return (
<>
<PageTitle title={ `Tx batches (L2${ nbsp }blocks)` } withTextAd/>
<PageTitle title="Txn batches" withTextAd/>
<DataListDisplay
isError={ isError }
items={ data?.items }
emptyText="There are no tx batches."
emptyText="There are no txn batches."
content={ content }
actionBar={ actionBar }
/>
Expand Down
2 changes: 1 addition & 1 deletion ui/pages/OptimisticL2TxnBatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const OptimisticL2TxnBatch = () => {
}

return {
label: 'Back to tx batches list',
label: 'Back to txn batches list',
url: appProps.referrer,
};
}, [ appProps.referrer ]);
Expand Down
7 changes: 3 additions & 4 deletions ui/pages/OptimisticL2TxnBatches.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Hide, Show, Skeleton, Text } from '@chakra-ui/react';
import React from 'react';

import useApiQuery from 'lib/api/useApiQuery';
import { nbsp } from 'lib/html-entities';
import { L2_TXN_BATCHES_ITEM } from 'stubs/L2';
import { generateListStub } from 'stubs/utils';
import { ACTION_BAR_HEIGHT_DESKTOP } from 'ui/shared/ActionBar';
Expand Down Expand Up @@ -60,7 +59,7 @@ const OptimisticL2TxnBatches = () => {

return (
<Skeleton isLoaded={ !countersQuery.isPlaceholderData && !isPlaceholderData } display="flex" flexWrap="wrap">
Tx batch (L2 block)
Txn batch
<Text fontWeight={ 600 } whiteSpace="pre"> #{ data.items[0].internal_id } </Text>to
<Text fontWeight={ 600 } whiteSpace="pre"> #{ data.items[data.items.length - 1].internal_id } </Text>
(total of { countersQuery.data?.toLocaleString() } batches)
Expand All @@ -72,11 +71,11 @@ const OptimisticL2TxnBatches = () => {

return (
<>
<PageTitle title={ `Tx batches (L2${ nbsp }blocks)` } withTextAd/>
<PageTitle title="Txn batches" withTextAd/>
<DataListDisplay
isError={ isError }
items={ data?.items }
emptyText="There are no tx batches."
emptyText="There are no txn batches."
content={ content }
actionBar={ actionBar }
/>
Expand Down
4 changes: 2 additions & 2 deletions ui/pages/ZkEvmL2TxnBatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const ZkEvmL2TxnBatch = () => {
}

return {
label: 'Back to tx batches list',
label: 'Back to txn batches list',
url: appProps.referrer,
};
}, [ appProps.referrer ]);
Expand All @@ -68,7 +68,7 @@ const ZkEvmL2TxnBatch = () => {
<>
<TextAd mb={ 6 }/>
<PageTitle
title={ `Tx batch #${ number }` }
title={ `Txn batch #${ number }` }
backLink={ backLink }
/>
{ batchQuery.isPlaceholderData ? <TabsSkeleton tabs={ tabs }/> : (
Expand Down
6 changes: 3 additions & 3 deletions ui/pages/ZkEvmL2TxnBatches.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const ZkEvmL2TxnBatches = () => {

return (
<Skeleton isLoaded={ !countersQuery.isPlaceholderData && !isPlaceholderData } display="flex" flexWrap="wrap">
Tx batch
Txn batch
<Text fontWeight={ 600 } whiteSpace="pre"> #{ data.items[0].number } </Text>to
<Text fontWeight={ 600 } whiteSpace="pre"> #{ data.items[data.items.length - 1].number } </Text>
(total of { countersQuery.data?.toLocaleString() } batches)
Expand All @@ -71,11 +71,11 @@ const ZkEvmL2TxnBatches = () => {

return (
<>
<PageTitle title="Tx batches" withTextAd/>
<PageTitle title="Txn batches" withTextAd/>
<DataListDisplay
isError={ isError }
items={ data?.items }
emptyText="There are no tx batches."
emptyText="There are no txn batches."
content={ content }
actionBar={ actionBar }
/>
Expand Down
4 changes: 2 additions & 2 deletions ui/pages/ZkSyncL2TxnBatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const ZkSyncL2TxnBatch = () => {
}

return {
label: 'Back to tx batches list',
label: 'Back to txn batches list',
url: appProps.referrer,
};
}, [ appProps.referrer ]);
Expand All @@ -89,7 +89,7 @@ const ZkSyncL2TxnBatch = () => {
<>
<TextAd mb={ 6 }/>
<PageTitle
title={ `Tx batch #${ number }` }
title={ `Txn batch #${ number }` }
backLink={ backLink }
/>
{ batchQuery.isPlaceholderData ?
Expand Down
6 changes: 3 additions & 3 deletions ui/pages/ZkSyncL2TxnBatches.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const ZkSyncL2TxnBatches = () => {

return (
<Skeleton isLoaded={ !countersQuery.isPlaceholderData && !isPlaceholderData } display="flex" flexWrap="wrap">
Tx batch
Txn batch
<Text fontWeight={ 600 } whiteSpace="pre"> #{ data.items[0].number } </Text>to
<Text fontWeight={ 600 } whiteSpace="pre"> #{ data.items[data.items.length - 1].number } </Text>
(total of { countersQuery.data?.toLocaleString() } batches)
Expand All @@ -71,11 +71,11 @@ const ZkSyncL2TxnBatches = () => {

return (
<>
<PageTitle title="Tx batches" withTextAd/>
<PageTitle title="Txn batches" withTextAd/>
<DataListDisplay
isError={ isError }
items={ data?.items }
emptyText="There are no tx batches."
emptyText="There are no txn batches."
content={ content }
actionBar={ actionBar }
/>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ui/tx/details/TxInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ const TxInfo = ({ data, isLoading, socketStatus }: Props) => {
hint="Batch index for this transaction"
isLoading={ isLoading }
>
Tx batch
Txn batch
</DetailsInfoItem.Label>
<DetailsInfoItem.Value>
<BatchEntityL2
Expand Down
6 changes: 3 additions & 3 deletions ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const ArbitrumL2TxnBatchDetails = ({ query }: Props) => {
isLoading={ isPlaceholderData }
hint="Batch number indicates the length of batches produced by grouping L2 blocks to be proven on L1"
>
Tx batch number
Txn batch number
</DetailsInfoItem.Label>
<DetailsInfoItem.Value>
<Skeleton isLoaded={ !isPlaceholderData }>
Expand All @@ -86,8 +86,8 @@ const ArbitrumL2TxnBatchDetails = ({ query }: Props) => {
<PrevNext
ml={ 6 }
onClick={ handlePrevNextClick }
prevLabel="View previous tx batch"
nextLabel="View next tx batch"
prevLabel="View previous txn batch"
nextLabel="View next txn batch"
isPrevDisabled={ data.number === 0 }
isLoading={ isPlaceholderData }
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const OptimisticL2TxnBatchBlobCelestia = ({ blobs, isLoading }: Props) => {
<Icon as={ celeniumIcon } boxSize={ 5 }/>
<LinkExternal href={ getCeleniumUrl(blob) }>Blob page</LinkExternal>
</GridItem>
<GridItem fontWeight={ 600 }>Hight</GridItem>
<GridItem fontWeight={ 600 }>Height</GridItem>
<GridItem colSpan={ 2 }>
{ blob.height }
</GridItem>
Expand Down
4 changes: 2 additions & 2 deletions ui/txnBatches/optimisticL2/OptimisticL2TxnBatchDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ const OptimisticL2TxnBatchDetails = ({ query }: Props) => {
<PrevNext
ml={ 6 }
onClick={ handlePrevNextClick }
prevLabel="View previous tx batch"
nextLabel="View next tx batch"
prevLabel="View previous txn batch"
nextLabel="View next txn batch"
isPrevDisabled={ data.internal_id === 0 }
isLoading={ isPlaceholderData }
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const OptimisticL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
</LinkInternal>
</ListItemMobileGrid.Value>

<ListItemMobileGrid.Label isLoading={ isLoading }>L2 blocks</ListItemMobileGrid.Label>
<ListItemMobileGrid.Label isLoading={ isLoading }>Txn</ListItemMobileGrid.Label>
<ListItemMobileGrid.Value>
<LinkInternal
href={ route({ pathname: '/batches/[number]', query: { number: item.internal_id.toString(), tab: 'txs' } }) }
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions ui/txnBatches/zkEvmL2/ZkEvmL2TxnBatchDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const ZkEvmL2TxnBatchDetails = ({ query }: Props) => {
<DetailsInfoItem.Label
isLoading={ isPlaceholderData }
>
Tx batch number
Txn batch number
</DetailsInfoItem.Label>
<DetailsInfoItem.Value>
<Skeleton isLoaded={ !isPlaceholderData }>
Expand All @@ -73,8 +73,8 @@ const ZkEvmL2TxnBatchDetails = ({ query }: Props) => {
<PrevNext
ml={ 6 }
onClick={ handlePrevNextClick }
prevLabel="View previous tx batch"
nextLabel="View next tx batch"
prevLabel="View previous txn batch"
nextLabel="View next txn batch"
isPrevDisabled={ data.number === 0 }
isLoading={ isPlaceholderData }
/>
Expand Down
6 changes: 3 additions & 3 deletions ui/txnBatches/zkSyncL2/ZkSyncL2TxnBatchDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const ZkSyncL2TxnBatchDetails = ({ query }: Props) => {
hint="Batch number indicates the length of batches produced by grouping L2 blocks to be proven on Ethereum."
isLoading={ isPlaceholderData }
>
Tx batch number
Txn batch number
</DetailsInfoItem.Label>
<DetailsInfoItem.Value>
<Skeleton isLoaded={ !isPlaceholderData }>
Expand All @@ -89,8 +89,8 @@ const ZkSyncL2TxnBatchDetails = ({ query }: Props) => {
<PrevNext
ml={ 6 }
onClick={ handlePrevNextClick }
prevLabel="View previous tx batch"
nextLabel="View next tx batch"
prevLabel="View previous txn batch"
nextLabel="View next txn batch"
isPrevDisabled={ data.number === 0 }
isLoading={ isPlaceholderData }
/>
Expand Down

0 comments on commit 6095da7

Please sign in to comment.