Skip to content

Commit 347906b

Browse files
committed
continue
1 parent 8ff0c9c commit 347906b

33 files changed

+824
-254
lines changed

configs/envs/.env.zetachain_testnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ NEXT_PUBLIC_VIEWS_ADDRESS_IDENTICON_TYPE=blockie
4949
NEXT_PUBLIC_VIEWS_CONTRACT_SOLIDITYSCAN_ENABLED=true
5050
NEXT_PUBLIC_VIEWS_TOKEN_SCAM_TOGGLE_ENABLED=true
5151
NEXT_PUBLIC_VISUALIZE_API_HOST=https://visualizer.services.blockscout.com
52-
NEXT_PUBLIC_ZETACHAIN_SERVICE_API_HOST=https://zetachain-indexer.duckdns.org
52+
NEXT_PUBLIC_ZETACHAIN_SERVICE_API_HOST=https://zetachain-indexer.ddns.net
5353
NEXT_PUBLIC_ZETACHAIN_SERVICE_CHAINS_CONFIG_URL=https://raw.githubusercontent.com/blockscout/frontend-configs/refs/heads/cross-chain/configs/cross-chain/zetachain.json

mocks/zetaChain/zetaChainCCTX.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ export const zetaChainCCTXItem: ZetaChainCCTX = {
55
status: 'PENDING_OUTBOUND',
66
status_reduced: 'PENDING',
77
amount: '185354164223052',
8-
source_chain_id: '7001',
9-
target_chain_id: '11155111',
8+
source_chain_id: 7001,
9+
target_chain_id: 11155111,
1010
created_timestamp: '1753181402',
1111
last_update_timestamp: '1753181402',
1212
sender_address: '0xbE8b5d82DDE00677cCdb9dc22071CF635d459223',
@@ -20,7 +20,13 @@ export const zetaChainCCTX: ZetaChainCCTXResponse = {
2020
creator: '',
2121
index: '0x1c1e7410d7dfefe6173cc11efa47221e85587d3831c69108121198e0b2a86657',
2222
zeta_fees: '0',
23-
relayed_message: '',
23+
relayed_message: '0x0000000000000000000000000000000000000000000000000000000000000000',
24+
cctx_status_reduced: 'SUCCESS',
25+
token_symbol: 'USDT.ARBSEP',
26+
token_name: 'USDT.ARBSEP',
27+
zrc20_contract_address: '0x1234567890123456789012345678901234567890',
28+
icon_url: 'https://example.com/icon.png',
29+
decimals: 6,
2430
cctx_status: {
2531
status: 'OUTBOUND_MINED',
2632
status_message: '',
@@ -30,6 +36,7 @@ export const zetaChainCCTX: ZetaChainCCTXResponse = {
3036
created_timestamp: '0',
3137
error_message_revert: '',
3238
error_message_abort: '',
39+
status_reduced: 'SUCCESS',
3340
},
3441
inbound_params: {
3542
sender: '0x44D1F1f9289DBA1Cf5824bd667184cEBE020aA1c',
@@ -50,7 +57,7 @@ export const zetaChainCCTX: ZetaChainCCTXResponse = {
5057
outbound_params: [
5158
{
5259
receiver: '0xcf558D29999C119425d28bF1c07ba97FfF39e387',
53-
receiver_chain_id: '97',
60+
receiver_chain_id: 97,
5461
coin_type: 'GAS',
5562
amount: '434880247204065094',
5663
tss_nonce: '62305',
@@ -84,13 +91,14 @@ export const zetaChainCCTX: ZetaChainCCTXResponse = {
8491
{
8592
index: '0x0001150419abd8d8383fae702f3a8415e57c96e78c9815756d15e1f1f5c0f466',
8693
depth: 0,
87-
source_chain_id: '5',
94+
source_chain_id: 5,
8895
status: 'OUTBOUND_MINED',
8996
inbound_amount: '100000000000000000',
9097
inbound_coin_type: 'GAS',
9198
outbound_params: [
92-
{ amount: '0', chain_id: '7001', coin_type: 'GAS' },
99+
{ amount: '0', chain_id: 7001, coin_type: 'GAS' },
93100
],
101+
status_reduced: 'SUCCESS',
94102
},
95103
],
96104
};

toolkit/theme/foundations/semanticTokens.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ const semanticTokens: ThemingConfig['semanticTokens'] = {
436436
primary: { value: { _light: '{colors.blackAlpha.800}', _dark: '{colors.whiteAlpha.800}' } },
437437
secondary: { value: { _light: '{colors.gray.500}', _dark: '{colors.gray.400}' } },
438438
error: { value: '{colors.red.500}' },
439+
success: { value: { _light: '{colors.green.500}', _dark: '{colors.green.200}' } },
439440
},
440441
border: {
441442
divider: { value: { _light: '{colors.blackAlpha.100}', _dark: '{colors.whiteAlpha.100}' } },

toolkit/theme/globalCss.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const globalCss: SystemConfig['globalCss'] = {
2424
WebkitTapHighlightColor: 'transparent',
2525
fontVariantLigatures: 'no-contextual',
2626
focusRingStyle: 'hidden',
27+
'--scrollbar-width': '20px',
2728
},
2829
mark: {
2930
bg: 'global.mark.bg',

types/api/zetaChain.ts

Lines changed: 54 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ export type ZetaChainCCTX = {
1515
last_update_timestamp: string;
1616
receiver_address: string;
1717
sender_address: string;
18-
source_chain_id: string;
18+
source_chain_id: number;
1919
status: ZetaChainCCTXStatus;
2020
status_reduced: ZetaChainCCTXStatusReduced;
21-
target_chain_id: string;
21+
target_chain_id: number;
2222
token_symbol?: string;
2323
asset?: string;
2424
decimals?: string | null;
@@ -29,8 +29,10 @@ export type ZetaChainCCTXResponse = {
2929
index: string;
3030
zeta_fees: string;
3131
relayed_message: string;
32+
cctx_status_reduced: ZetaChainCCTXStatusReduced;
3233
cctx_status: {
3334
status: ZetaChainCCTXStatus;
35+
status_reduced: ZetaChainCCTXStatusReduced;
3436
status_message: string;
3537
error_message: string;
3638
last_update_timestamp: string;
@@ -55,29 +57,7 @@ export type ZetaChainCCTXResponse = {
5557
status: ZetaChainCCTXInboundStatus;
5658
confirmation_mode: ZetaChainCCTXConfirmationMode;
5759
};
58-
outbound_params: Array<{
59-
receiver: string;
60-
receiver_chain_id: string;
61-
coin_type: ZetaChainCCTXCoinType;
62-
amount: string;
63-
tss_nonce: string;
64-
gas_limit: string;
65-
gas_price: string;
66-
gas_priority_fee: string;
67-
hash: string;
68-
ballot_index: string;
69-
observed_external_height: string;
70-
gas_used: string;
71-
effective_gas_price: string;
72-
effective_gas_limit: string;
73-
tss_pubkey: string;
74-
tx_finalization_status: ZetaChainCCTXFinalizationStatus;
75-
call_options: {
76-
gas_limit: string;
77-
is_arbitrary_call: boolean;
78-
};
79-
confirmation_mode: ZetaChainCCTXConfirmationMode;
80-
}>;
60+
outbound_params: Array<ZetaChainCCTXOutboundParams>;
8161
protocol_contract_version: string;
8262
revert_options: {
8363
revert_address: string;
@@ -86,19 +66,32 @@ export type ZetaChainCCTXResponse = {
8666
revert_message: string;
8767
revert_gas_limit: string;
8868
};
89-
related_cctxs: Array<{
90-
index: string;
91-
depth: number;
92-
source_chain_id: string;
93-
status: ZetaChainCCTXStatus;
94-
inbound_amount: string;
95-
inbound_coin_type: ZetaChainCCTXCoinType;
96-
outbound_params: Array<{
97-
amount: string;
98-
chain_id: string;
99-
coin_type: ZetaChainCCTXCoinType;
100-
}>;
69+
related_cctxs: Array<ZetaChainRelatedCCTX>;
70+
token_symbol?: string;
71+
token_name?: string;
72+
zrc20_contract_address?: string;
73+
icon_url?: string | null;
74+
decimals?: number;
75+
};
76+
77+
export type ZetaChainRelatedCCTX = {
78+
index: string;
79+
depth: number;
80+
source_chain_id: number;
81+
status: ZetaChainCCTXStatus;
82+
status_reduced: ZetaChainCCTXStatusReduced;
83+
inbound_amount: string;
84+
inbound_coin_type: ZetaChainCCTXCoinType;
85+
outbound_params: Array<{
86+
amount: string;
87+
chain_id: number;
88+
coin_type: ZetaChainCCTXCoinType;
10189
}>;
90+
token_symbol?: string;
91+
token_name?: string;
92+
zrc20_contract_address?: string;
93+
icon_url?: string | null;
94+
decimals?: number;
10295
};
10396

10497
export type ZetaChainCCTXStatus = 'PENDING_OUTBOUND' | 'PENDING_INBOUND' | 'OUTBOUND_MINED' | 'PENDING_REVERT' | 'ABORTED' | 'REVERTED';
@@ -112,3 +105,27 @@ export type ZetaChainCCTXFinalizationStatus = 'FINALIZED' | 'NOT_FINALIZED';
112105
export type ZetaChainCCTXConfirmationMode = 'SAFE' | 'FAST';
113106

114107
export type ZetaChainCCTXInboundStatus = 'SUCCESS' | 'INSUFFICIENT_DEPOSITOR_FEE' | 'INVALID_RECEIVER_ADDRESS' | 'INVALID_MEMO';
108+
109+
export type ZetaChainCCTXOutboundParams = {
110+
receiver: string;
111+
receiver_chain_id: number;
112+
coin_type: ZetaChainCCTXCoinType;
113+
amount: string;
114+
tss_nonce: string;
115+
gas_limit: string;
116+
gas_price: string;
117+
gas_priority_fee: string;
118+
hash: string;
119+
ballot_index: string;
120+
observed_external_height: string;
121+
gas_used: string;
122+
effective_gas_price: string;
123+
effective_gas_limit: string;
124+
tss_pubkey: string;
125+
tx_finalization_status: ZetaChainCCTXFinalizationStatus;
126+
call_options: {
127+
gas_limit: string;
128+
is_arbitrary_call: boolean;
129+
};
130+
confirmation_mode: ZetaChainCCTXConfirmationMode;
131+
};

ui/home/latestZetaChainCCTX/LatestZetaChainCCTXItem.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { ZetaChainCCTX } from 'types/api/zetaChain';
66
import TxEntityZetaChainCC from 'ui/shared/entities/tx/TxEntityZetaChainCC';
77
import TimeWithTooltip from 'ui/shared/time/TimeWithTooltip';
88
import ZetaChainAddressFromTo from 'ui/shared/zetaChain/ZetaChainAddressFromTo';
9-
import ZetaChainCCTXStatusTag from 'ui/shared/zetaChain/ZetaChainCCTXStatusTag';
9+
import ZetaChainCCTXReducedStatus from 'ui/shared/zetaChain/ZetaChainCCTXReducedStatus';
1010
import ZetaChainCCTXValue from 'ui/shared/zetaChain/ZetaChainCCTXValue';
1111

1212
type Props = {
@@ -27,11 +27,17 @@ const LatestZetaChainCCTXItem = ({ tx, isLoading }: Props) => {
2727
p={ 4 }
2828
fontSize="sm"
2929
>
30-
<ZetaChainCCTXStatusTag status={ tx.status_reduced } isLoading={ isLoading }/>
30+
<ZetaChainCCTXReducedStatus status={ tx.status_reduced } isLoading={ isLoading }/>
3131
<TxEntityZetaChainCC hash={ tx.index } isLoading={ isLoading } truncation="constant" fontWeight={ 600 }/>
3232
<TimeWithTooltip color="text.secondary" timestamp={ Number(tx.last_update_timestamp) * 1000 } isLoading={ isLoading } timeFormat="relative"/>
3333
<ZetaChainAddressFromTo tx={ tx } isLoading={ isLoading }/>
34-
<ZetaChainCCTXValue tx={ tx } isLoading={ isLoading } justifyContent="end"/>
34+
<ZetaChainCCTXValue
35+
coinType={ tx.coin_type }
36+
tokenSymbol={ tx.token_symbol }
37+
amount={ tx.amount }
38+
decimals={ tx.decimals }
39+
isLoading={ isLoading }
40+
/>
3541
</Grid>
3642
);
3743
};

ui/interopMessages/InteropMessageDestinationTx.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { ChainInfo } from 'types/api/interop';
44

55
import TxEntity from 'ui/shared/entities/tx/TxEntity';
66
import type { EntityProps } from 'ui/shared/entities/tx/TxEntity';
7-
import TxEntityInterop from 'ui/shared/entities/tx/TxEntityInterop';
7+
import TxEntityInterop from 'ui/shared/entities/tx/TxEntityWithExternalChain';
88

99
type Props = {
1010
relay_transaction_hash?: string | null;

ui/interopMessages/InteropMessageSourceTx.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { ChainInfo } from 'types/api/interop';
44

55
import type { EntityProps } from 'ui/shared/entities/tx/TxEntity';
66
import TxEntity from 'ui/shared/entities/tx/TxEntity';
7-
import TxEntityInterop from 'ui/shared/entities/tx/TxEntityInterop';
7+
import TxEntityInterop from 'ui/shared/entities/tx/TxEntityWithExternalChain';
88

99
type Props = {
1010
init_transaction_hash?: string | null;

ui/pages/TransactionsZetaChain.tsx

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@ import TxsWithFrontendSorting from 'ui/txs/TxsWithFrontendSorting';
2424
import ZetaChainCCTXsTab from 'ui/txs/zetaChain/ZetaChainCCTXsTab';
2525
import ZetaChainEvmTransactions from 'ui/txs/zetaChain/ZetaChainEvmTransactions';
2626

27-
const TAB_LIST_PROPS = {
28-
marginBottom: 0,
29-
pt: 6,
30-
pb: 6,
31-
marginTop: -5,
32-
};
33-
const TABS_HEIGHT = 88;
34-
3527
const ZETACHAIN_TABS = [ 'zetachain_validated', 'zetachain_pending' ];
3628
const CROSS_CHAIN_TABS = [ 'cctx_pending', 'cctx_mined' ];
3729

@@ -128,10 +120,7 @@ const TransactionsZetaChain = () => {
128120
<>
129121
<TxsStats/>
130122
{ topRow }
131-
<TxsWithFrontendSorting
132-
query={ txsWithBlobsQuery }
133-
top={ TABS_HEIGHT }
134-
/>
123+
<TxsWithFrontendSorting query={ txsWithBlobsQuery }/>
135124
</>
136125
),
137126
},
@@ -154,11 +143,7 @@ const TransactionsZetaChain = () => {
154143
title={ config.meta.seo.enhancedDataEnabled ? `${ config.chain.name } transactions` : 'Transactions' }
155144
withTextAd
156145
/>
157-
<RoutedTabs
158-
tabs={ tabs }
159-
listProps={ isMobile ? undefined : TAB_LIST_PROPS }
160-
stickyEnabled={ !isMobile }
161-
/>
146+
<RoutedTabs tabs={ tabs }/>
162147
</>
163148
);
164149
};

ui/pages/ZetaChainCCTX.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import throwOnResourceLoadError from 'lib/errors/throwOnResourceLoadError';
66
import getQueryParamString from 'lib/router/getQueryParamString';
77
import { zetaChainCCTX } from 'mocks/zetaChain/zetaChainCCTX';
88
import TextAd from 'ui/shared/ad/TextAd';
9-
import TxEntity from 'ui/shared/entities/tx/TxEntity';
9+
import TxEntityZetaChainCC from 'ui/shared/entities/tx/TxEntityZetaChainCC';
1010
import PageTitle from 'ui/shared/Page/PageTitle';
1111
import ZetaChainCCTXDetails from 'ui/txs/zetaChain/ZetaChainCCTXDetails';
1212

@@ -29,7 +29,7 @@ const ZetaChainCCTX = () => {
2929
<TextAd mb={ 6 }/>
3030
<PageTitle
3131
title="Cross-chain tx details"
32-
secondRow={ <TxEntity hash={ hash } noLink noIcon noCopy={ false } variant="subheading" mr={{ base: 0, lg: 2 }}/> }
32+
secondRow={ <TxEntityZetaChainCC hash={ hash } noLink noCopy={ false } variant="subheading" mr={{ base: 0, lg: 2 }}/> }
3333
/>
3434
<ZetaChainCCTXDetails data={ cctxQuery.data } isLoading={ cctxQuery.isPlaceholderData }/>
3535
</>

0 commit comments

Comments
 (0)