Commit efeb703c authored by isstuev's avatar isstuev Committed by isstuev

rebase fix

parent 52062102
...@@ -5,8 +5,8 @@ import { getEnvValue } from '../utils'; ...@@ -5,8 +5,8 @@ import { getEnvValue } from '../utils';
const title = 'ZkEVM rollup (L2) chain'; const title = 'ZkEVM rollup (L2) chain';
const config: Feature<{ L1BaseUrl: string; withdrawalUrl?: string }> = (() => { const config: Feature<{ L1BaseUrl: string; withdrawalUrl?: string }> = (() => {
const L1BaseUrl = getEnvValue(process.env.NEXT_PUBLIC_L1_BASE_URL); const L1BaseUrl = getEnvValue('NEXT_PUBLIC_L1_BASE_URL');
const isZkEvm = getEnvValue(process.env.NEXT_PUBLIC_IS_ZKEVM_L2_NETWORK) === 'true'; const isZkEvm = getEnvValue('NEXT_PUBLIC_IS_ZKEVM_L2_NETWORK') === 'true';
if (isZkEvm && L1BaseUrl) { if (isZkEvm && L1BaseUrl) {
return Object.freeze({ return Object.freeze({
......
...@@ -45,6 +45,7 @@ NEXT_PUBLIC_APP_ENV=testing ...@@ -45,6 +45,7 @@ NEXT_PUBLIC_APP_ENV=testing
NEXT_PUBLIC_MARKETPLACE_CONFIG_URL=https://localhost:3000/marketplace-config.json NEXT_PUBLIC_MARKETPLACE_CONFIG_URL=https://localhost:3000/marketplace-config.json
NEXT_PUBLIC_MARKETPLACE_SUBMIT_FORM=https://localhost:3000/marketplace-submit-form NEXT_PUBLIC_MARKETPLACE_SUBMIT_FORM=https://localhost:3000/marketplace-submit-form
NEXT_PUBLIC_IS_L2_NETWORK=false NEXT_PUBLIC_IS_L2_NETWORK=false
NEXT_PUBLIC_IS_ZKEVM_L2_NETWORK=false
NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED=true NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED=true
NEXT_PUBLIC_AUTH_URL=http://localhost:3100 NEXT_PUBLIC_AUTH_URL=http://localhost:3100
NEXT_PUBLIC_LOGOUT_URL=https://blockscoutcom.us.auth0.com/v2/logout NEXT_PUBLIC_LOGOUT_URL=https://blockscoutcom.us.auth0.com/v2/logout
......
...@@ -41,6 +41,7 @@ NEXT_PUBLIC_APP_INSTANCE=pw ...@@ -41,6 +41,7 @@ NEXT_PUBLIC_APP_INSTANCE=pw
NEXT_PUBLIC_MARKETPLACE_CONFIG_URL=https://localhost:3000/marketplace-config.json NEXT_PUBLIC_MARKETPLACE_CONFIG_URL=https://localhost:3000/marketplace-config.json
NEXT_PUBLIC_MARKETPLACE_SUBMIT_FORM=https://localhost:3000/marketplace-submit-form NEXT_PUBLIC_MARKETPLACE_SUBMIT_FORM=https://localhost:3000/marketplace-submit-form
NEXT_PUBLIC_IS_L2_NETWORK=false NEXT_PUBLIC_IS_L2_NETWORK=false
NEXT_PUBLIC_IS_ZKEVM_L2_NETWORK=false
NEXT_PUBLIC_AD_BANNER_PROVIDER=slise NEXT_PUBLIC_AD_BANNER_PROVIDER=slise
NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED=true NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED=true
NEXT_PUBLIC_AUTH_URL=http://localhost:3100 NEXT_PUBLIC_AUTH_URL=http://localhost:3100
......
...@@ -107,6 +107,7 @@ const rollupSchema = yup ...@@ -107,6 +107,7 @@ const rollupSchema = yup
.object() .object()
.shape({ .shape({
NEXT_PUBLIC_IS_L2_NETWORK: yup.boolean(), NEXT_PUBLIC_IS_L2_NETWORK: yup.boolean(),
NEXT_PUBLIC_IS_ZKEVM_L2_NETWORK: yup.boolean(),
NEXT_PUBLIC_L1_BASE_URL: yup NEXT_PUBLIC_L1_BASE_URL: yup
.string() .string()
.when('NEXT_PUBLIC_IS_L2_NETWORK', { .when('NEXT_PUBLIC_IS_L2_NETWORK', {
......
...@@ -17,6 +17,7 @@ const PAGE_PROPS = { ...@@ -17,6 +17,7 @@ const PAGE_PROPS = {
id: '', id: '',
height_or_hash: '', height_or_hash: '',
hash: '', hash: '',
number: '',
q: '', q: '',
}; };
......
...@@ -13,6 +13,7 @@ const AppContext = createContext<PageProps>({ ...@@ -13,6 +13,7 @@ const AppContext = createContext<PageProps>({
id: '', id: '',
height_or_hash: '', height_or_hash: '',
hash: '', hash: '',
number: '',
q: '', q: '',
}); });
......
...@@ -77,7 +77,7 @@ export default function useNavItems(): ReturnType { ...@@ -77,7 +77,7 @@ export default function useNavItems(): ReturnType {
txs, txs,
blocks, blocks,
// eslint-disable-next-line max-len // eslint-disable-next-line max-len
{ text: 'Txn batches', nextRoute: { pathname: '/zkevm-l2-txn-batches' as const }, icon: txnBatchIcon, isActive: pathname === '/zkevm-l2-txn-batches' || pathname === '/batch/[number]' }, { text: 'Txn batches', nextRoute: { pathname: '/zkevm-l2-txn-batches' as const }, icon: txnBatchIcon, isActive: pathname === '/zkevm-l2-txn-batches' || pathname === '/zkevm-l2-txn-batch/[number]' },
], ],
[ [
topAccounts, topAccounts,
......
...@@ -36,6 +36,8 @@ const OG_TYPE_DICT: Record<Route['pathname'], OGPageType> = { ...@@ -36,6 +36,8 @@ const OG_TYPE_DICT: Record<Route['pathname'], OGPageType> = {
'/l2-output-roots': 'Root page', '/l2-output-roots': 'Root page',
'/l2-txn-batches': 'Root page', '/l2-txn-batches': 'Root page',
'/l2-withdrawals': 'Root page', '/l2-withdrawals': 'Root page',
'/zkevm-l2-txn-batches': 'Root page',
'/zkevm-l2-txn-batch/[number]': 'Regular page',
'/404': 'Regular page', '/404': 'Regular page',
// service routes, added only to make typescript happy // service routes, added only to make typescript happy
......
...@@ -39,6 +39,8 @@ const TEMPLATE_MAP: Record<Route['pathname'], string> = { ...@@ -39,6 +39,8 @@ const TEMPLATE_MAP: Record<Route['pathname'], string> = {
'/l2-output-roots': DEFAULT_TEMPLATE, '/l2-output-roots': DEFAULT_TEMPLATE,
'/l2-txn-batches': DEFAULT_TEMPLATE, '/l2-txn-batches': DEFAULT_TEMPLATE,
'/l2-withdrawals': DEFAULT_TEMPLATE, '/l2-withdrawals': DEFAULT_TEMPLATE,
'/zkevm-l2-txn-batches': DEFAULT_TEMPLATE,
'/zkevm-l2-txn-batch/[number]': DEFAULT_TEMPLATE,
'/404': DEFAULT_TEMPLATE, '/404': DEFAULT_TEMPLATE,
// service routes, added only to make typescript happy // service routes, added only to make typescript happy
......
...@@ -34,6 +34,8 @@ const TEMPLATE_MAP: Record<Route['pathname'], string> = { ...@@ -34,6 +34,8 @@ const TEMPLATE_MAP: Record<Route['pathname'], string> = {
'/l2-output-roots': 'output roots', '/l2-output-roots': 'output roots',
'/l2-txn-batches': 'Tx batches (L2 blocks)', '/l2-txn-batches': 'Tx batches (L2 blocks)',
'/l2-withdrawals': 'withdrawals (L2 > L1)', '/l2-withdrawals': 'withdrawals (L2 > L1)',
'/zkevm-l2-txn-batches': 'zkEvm L2 Tx batches',
'/zkevm-l2-txn-batch/[number]': 'zkEvm L2 Tx batch %number%',
'/404': 'error - page not found', '/404': 'error - page not found',
// service routes, added only to make typescript happy // service routes, added only to make typescript happy
......
...@@ -34,6 +34,8 @@ export const PAGE_TYPE_DICT: Record<Route['pathname'], string> = { ...@@ -34,6 +34,8 @@ export const PAGE_TYPE_DICT: Record<Route['pathname'], string> = {
'/l2-output-roots': 'Output roots', '/l2-output-roots': 'Output roots',
'/l2-txn-batches': 'Tx batches (L2 blocks)', '/l2-txn-batches': 'Tx batches (L2 blocks)',
'/l2-withdrawals': 'Withdrawals (L2 > L1)', '/l2-withdrawals': 'Withdrawals (L2 > L1)',
'/zkevm-l2-txn-batches': 'ZkEvm L2 Tx batches',
'/zkevm-l2-txn-batch/[number]': 'ZkEvm L2 Tx batch details',
'/404': '404', '/404': '404',
// service routes, added only to make typescript happy // service routes, added only to make typescript happy
......
...@@ -27,6 +27,7 @@ const defaultAppContext = { ...@@ -27,6 +27,7 @@ const defaultAppContext = {
id: '', id: '',
height_or_hash: '', height_or_hash: '',
hash: '', hash: '',
number: '',
q: '', q: '',
}, },
}; };
......
...@@ -29,10 +29,8 @@ export const featureEnvs = { ...@@ -29,10 +29,8 @@ export const featureEnvs = {
value: '[{"type":"omni","title":"OmniBridge","short_title":"OMNI"},{"type":"amb","title":"Arbitrary Message Bridge","short_title":"AMB"}]', value: '[{"type":"omni","title":"OmniBridge","short_title":"OMNI"},{"type":"amb","title":"Arbitrary Message Bridge","short_title":"AMB"}]',
}, },
zkRollup: [ zkRollup: [
{ name: 'NEXT_PUBLIC_IS_L2_NETWORK', value: 'true' },
{ name: 'NEXT_PUBLIC_IS_ZKEVM_L2_NETWORK', value: 'true' }, { name: 'NEXT_PUBLIC_IS_ZKEVM_L2_NETWORK', value: 'true' },
{ name: 'NEXT_PUBLIC_L1_BASE_URL', value: 'https://localhost:3101' }, { name: 'NEXT_PUBLIC_L1_BASE_URL', value: 'https://localhost:3101' },
{ name: 'NEXT_PUBLIC_L2_WITHDRAWAL_URL', value: 'https://localhost:3102' },
], ],
}; };
......
...@@ -154,7 +154,7 @@ const TxDetails = () => { ...@@ -154,7 +154,7 @@ const TxDetails = () => {
</Tag> </Tag>
) } ) }
</DetailsInfoItem> </DetailsInfoItem>
{ config.features.zkEvmRollup.isEnabled && ( { data.zkevm_status && (
<DetailsInfoItem <DetailsInfoItem
title="Confirmation status" title="Confirmation status"
isLoading={ isPlaceholderData } isLoading={ isPlaceholderData }
......
...@@ -9,7 +9,7 @@ import rightArrowIcon from 'icons/arrows/east.svg'; ...@@ -9,7 +9,7 @@ import rightArrowIcon from 'icons/arrows/east.svg';
import Icon from 'ui/shared/chakra/Icon'; import Icon from 'ui/shared/chakra/Icon';
import Tag from 'ui/shared/chakra/Tag'; import Tag from 'ui/shared/chakra/Tag';
import AddressEntity from 'ui/shared/entities/address/AddressEntity'; import AddressEntity from 'ui/shared/entities/address/AddressEntity';
import TxStatus from 'ui/shared/TxStatus'; import TxStatus from 'ui/shared/statusTag/TxStatus';
import { TX_INTERNALS_ITEMS } from 'ui/tx/internals/utils'; import { TX_INTERNALS_ITEMS } from 'ui/tx/internals/utils';
type Props = InternalTransaction & { type Props = InternalTransaction & {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment