mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
Sync upstream
This commit is contained in:
Binary file not shown.
@@ -39,10 +39,6 @@ export interface AddressZilliqaParams {
|
||||
is_scilla_contract: boolean;
|
||||
}
|
||||
|
||||
export interface AddressZilliqaParams {
|
||||
is_scilla_contract: boolean;
|
||||
}
|
||||
|
||||
export interface AddressCounters {
|
||||
transactions_count: string;
|
||||
token_transfers_count: string;
|
||||
|
||||
@@ -3,6 +3,7 @@ import { useRouter } from 'next/router';
|
||||
import React from 'react';
|
||||
|
||||
import type { AddressImplementation } from 'types/api/addressParams';
|
||||
import type { SmartContractProxyType } from 'types/api/contract';
|
||||
|
||||
import useApiQuery from 'lib/api/useApiQuery';
|
||||
import getQueryParamString from 'lib/router/getQueryParamString';
|
||||
@@ -18,9 +19,10 @@ import { formatAbi } from './utils';
|
||||
interface Props {
|
||||
implementations: Array<AddressImplementation>;
|
||||
isLoading?: boolean;
|
||||
proxyType?: SmartContractProxyType;
|
||||
}
|
||||
|
||||
const ContractMethodsProxy = ({ implementations, isLoading: isInitialLoading }: Props) => {
|
||||
const ContractMethodsProxy = ({ implementations, isLoading: isInitialLoading, proxyType }: Props) => {
|
||||
const router = useRouter();
|
||||
const sourceAddress = getQueryParamString(router.query.source_address);
|
||||
const tab = getQueryParamString(router.query.tab);
|
||||
@@ -48,7 +50,7 @@ const ContractMethodsProxy = ({ implementations, isLoading: isInitialLoading }:
|
||||
selectedItem={ selectedItem }
|
||||
onItemSelect={ setSelectedItem }
|
||||
isLoading={ isInitialLoading }
|
||||
label="Implementation address"
|
||||
label={ proxyType === 'eip7702' ? 'Delegate address' : 'Implementation address' }
|
||||
mb={ 3 }
|
||||
/>
|
||||
<ContractMethodsFilters
|
||||
|
||||
+11
-4
@@ -239,16 +239,18 @@ const AddressPageContent = () => {
|
||||
addressQuery.data?.is_contract ? {
|
||||
id: 'contract',
|
||||
title: () => {
|
||||
const tabName = addressQuery.data.proxy_type === 'eip7702' ? 'Code' : 'Contract';
|
||||
|
||||
if (addressQuery.data.is_verified) {
|
||||
return (
|
||||
<>
|
||||
<span>Contract</span>
|
||||
<span>{ tabName }</span>
|
||||
<IconSvg name="status/success" boxSize="14px" color="green.500" ml={ 1 }/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
return 'Contract';
|
||||
return tabName;
|
||||
},
|
||||
component: (
|
||||
<AddressContract
|
||||
@@ -279,7 +281,12 @@ const AddressPageContent = () => {
|
||||
config.features.validators.isEnabled && addressQuery.data?.has_validated_blocks ?
|
||||
{ slug: 'validator', name: 'Validator', tagType: 'custom' as const, ordinal: PREDEFINED_TAG_PRIORITY } :
|
||||
undefined,
|
||||
addressQuery.data?.implementations?.length ? { slug: 'proxy', name: 'Proxy', tagType: 'custom' as const, ordinal: PREDEFINED_TAG_PRIORITY } : undefined,
|
||||
addressQuery.data?.implementations?.length && addressQuery.data?.proxy_type !== 'eip7702' ?
|
||||
{ slug: 'proxy', name: 'Proxy', tagType: 'custom' as const, ordinal: PREDEFINED_TAG_PRIORITY } :
|
||||
undefined,
|
||||
addressQuery.data?.implementations?.length && addressQuery.data?.proxy_type === 'eip7702' ?
|
||||
{ slug: 'eip7702', name: 'EOA+code', tagType: 'custom' as const, ordinal: PREDEFINED_TAG_PRIORITY } :
|
||||
undefined,
|
||||
addressQuery.data?.token ? { slug: 'token', name: 'Token', tagType: 'custom' as const, ordinal: PREDEFINED_TAG_PRIORITY } : undefined,
|
||||
isSafeAddress ? { slug: 'safe', name: 'Multisig: Safe', tagType: 'custom' as const, ordinal: -10 } : undefined,
|
||||
addressProfileAPIFeature.isEnabled && usernameApiTag ? {
|
||||
@@ -417,7 +424,7 @@ const AddressPageContent = () => {
|
||||
<>
|
||||
<TextAd mb={ 6 }/>
|
||||
<PageTitle
|
||||
title={ `${ addressQuery.data?.is_contract ? 'Contract' : 'Address' } details` }
|
||||
title={ `${ addressQuery.data?.is_contract && addressQuery.data?.proxy_type !== 'eip7702' ? 'Contract' : 'Address' } details` }
|
||||
backLink={ backLink }
|
||||
contentAfter={ titleContentAfter }
|
||||
secondRow={ titleSecondRow }
|
||||
|
||||
@@ -11,7 +11,6 @@ interface Props {
|
||||
const MainColumn = ({ children, className }: Props) => {
|
||||
return (
|
||||
<Flex
|
||||
id="MAIN_COLUMN"
|
||||
className={ className }
|
||||
flexDir="column"
|
||||
flexGrow={ 1 }
|
||||
|
||||
@@ -119,7 +119,8 @@ const Footer = () => {
|
||||
return (
|
||||
<Box gridArea={ gridArea }>
|
||||
<Flex columnGap={ 2 } fontSize="xs" lineHeight={ 5 } alignItems="center" color="text">
|
||||
<Link href="https://explore.lux.network" isExternal display="inline-flex" color={ logoColor } _hover={{ color: logoColor }}>
|
||||
<span>Made with</span>
|
||||
<Link href="https://www.blockscout.com" isExternal display="inline-flex" color={ logoColor } _hover={{ color: logoColor }}>
|
||||
<IconSvg
|
||||
name="networks/logo-placeholder"
|
||||
width="80px"
|
||||
@@ -128,7 +129,7 @@ const Footer = () => {
|
||||
</Link>
|
||||
</Flex>
|
||||
<Text mt={ 3 } fontSize="xs">
|
||||
Explore is a tool for inspecting and analyzing EVM based blockchains. Blockchain explorer for Lux Networks.
|
||||
Blockscout is a tool for inspecting and analyzing EVM based blockchains. Blockchain explorer for Ethereum Networks.
|
||||
</Text>
|
||||
<Box mt={ 6 } alignItems="start" fontSize="xs" lineHeight={ 5 }>
|
||||
{ apiVersionUrl && (
|
||||
|
||||
Reference in New Issue
Block a user