diff --git a/.github/workflows/deploy-review-l2.yml b/.github/workflows/deploy-review-l2.yml index ae88aca961..2ee4dd35e7 100644 --- a/.github/workflows/deploy-review-l2.yml +++ b/.github/workflows/deploy-review-l2.yml @@ -19,6 +19,7 @@ on: - eth - eth_sepolia - eth_goerli + - filecoin - optimism - optimism_celestia - optimism_sepolia diff --git a/.github/workflows/deploy-review.yml b/.github/workflows/deploy-review.yml index 73e3fa08e6..f183ead094 100644 --- a/.github/workflows/deploy-review.yml +++ b/.github/workflows/deploy-review.yml @@ -19,6 +19,7 @@ on: - eth - eth_sepolia - eth_goerli + - filecoin - optimism - optimism_celestia - optimism_sepolia diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 1a450a1365..40896494ac 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -367,6 +367,7 @@ "eth", "eth_goerli", "eth_sepolia", + "filecoin", "optimism", "optimism_celestia", "optimism_sepolia", diff --git a/configs/envs/.env.arbitrum b/configs/envs/.env.arbitrum index a1ec2fef59..1fc81ce901 100644 --- a/configs/envs/.env.arbitrum +++ b/configs/envs/.env.arbitrum @@ -1,6 +1,6 @@ # Set of ENVs for Arbitrum One network explorer # https://arbitrum.blockscout.com -# This is an auto-generated file. To update all values, run "yarn preset:sync --name=arbitrum" +# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=arbitrum" # Local ENVs NEXT_PUBLIC_APP_PROTOCOL=http diff --git a/configs/envs/.env.arbitrum_nova b/configs/envs/.env.arbitrum_nova index c07ded0b8a..2888565d7d 100644 --- a/configs/envs/.env.arbitrum_nova +++ b/configs/envs/.env.arbitrum_nova @@ -1,6 +1,6 @@ # Set of ENVs for Arbitrum One network explorer # https://arbitrum.blockscout.com -# This is an auto-generated file. To update all values, run "yarn preset:sync --name=arbitrum" +# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=arbitrum" # Local ENVs NEXT_PUBLIC_APP_PROTOCOL=http diff --git a/configs/envs/.env.base b/configs/envs/.env.base index 9003326a81..8eab44c966 100644 --- a/configs/envs/.env.base +++ b/configs/envs/.env.base @@ -1,6 +1,6 @@ # Set of ENVs for Base Mainnet network explorer # https://base.blockscout.com -# This is an auto-generated file. To update all values, run "yarn preset:sync --name=base" +# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=base" # Local ENVs NEXT_PUBLIC_APP_PROTOCOL=http diff --git a/configs/envs/.env.celo_alfajores b/configs/envs/.env.celo_alfajores index 2934345c90..01d1bf4c13 100644 --- a/configs/envs/.env.celo_alfajores +++ b/configs/envs/.env.celo_alfajores @@ -1,6 +1,6 @@ # Set of ENVs for Celo Alfajores network explorer # https://celo-alfajores.blockscout.com -# This is an auto-generated file. To update all values, run "yarn preset:sync --name=celo_alfajores" +# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=celo_alfajores" # Local ENVs NEXT_PUBLIC_APP_PROTOCOL=http diff --git a/configs/envs/.env.eth b/configs/envs/.env.eth index 42a4639b87..781a15d702 100644 --- a/configs/envs/.env.eth +++ b/configs/envs/.env.eth @@ -1,6 +1,6 @@ # Set of ENVs for Ethereum network explorer # https://eth.blockscout.com -# This is an auto-generated file. To update all values, run "yarn preset:sync --name=eth" +# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=eth" # Local ENVs NEXT_PUBLIC_APP_PROTOCOL=http diff --git a/configs/envs/.env.eth_sepolia b/configs/envs/.env.eth_sepolia index 46b25eddf3..9299600d29 100644 --- a/configs/envs/.env.eth_sepolia +++ b/configs/envs/.env.eth_sepolia @@ -1,6 +1,6 @@ # Set of ENVs for Sepolia network explorer # https://eth-sepolia.blockscout.com -# This is an auto-generated file. To update all values, run "yarn preset:sync --name=eth_sepolia" +# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=eth_sepolia" # Local ENVs NEXT_PUBLIC_APP_PROTOCOL=http diff --git a/configs/envs/.env.filecoin b/configs/envs/.env.filecoin new file mode 100644 index 0000000000..0f6e05cd25 --- /dev/null +++ b/configs/envs/.env.filecoin @@ -0,0 +1,42 @@ +# Set of ENVs for Filecoin Virtual Machine network explorer +# https://filecoin.blockscout.com +# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=filecoin" + +# Local ENVs +NEXT_PUBLIC_APP_PROTOCOL=http +NEXT_PUBLIC_APP_HOST=localhost +NEXT_PUBLIC_APP_PORT=3000 +NEXT_PUBLIC_APP_ENV=development +NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL=ws + +# Instance ENVs +NEXT_PUBLIC_API_BASE_PATH=/ +NEXT_PUBLIC_API_HOST=filecoin.blockscout.com +NEXT_PUBLIC_API_SPEC_URL=https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml +NEXT_PUBLIC_CONTRACT_CODE_IDES=[{'title':'Remix IDE','url':'https://remix.ethereum.org/?address={hash}&blockscout={domain}','icon_url':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/ide-icons/remix.png'}] +NEXT_PUBLIC_FOOTER_LINKS=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/footer-links/fvm.json +NEXT_PUBLIC_GRAPHIQL_TRANSACTION=0x5abb6212c1802402b828ed20c2bd4d4a6153b8bee68a5259cba3c8d7a7c6b775 +NEXT_PUBLIC_HOMEPAGE_CHARTS=['daily_txs', 'coin_price', 'market_cap'] +NEXT_PUBLIC_HOMEPAGE_PLATE_BACKGROUND=linear-gradient(237deg, rgb(26, 58, 150) 14.83%, rgb(111, 223, 164) 132.56%) +NEXT_PUBLIC_HOMEPAGE_PLATE_TEXT_COLOR=rgba(255, 255, 255, 1) +NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED=true +NEXT_PUBLIC_LOGOUT_URL=https://blockscout-filecoin.us.auth0.com/v2/logout +NEXT_PUBLIC_MARKETPLACE_ENABLED=false +NEXT_PUBLIC_METADATA_SERVICE_API_HOST=https://metadata.services.blockscout.com +NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS=18 +NEXT_PUBLIC_NETWORK_CURRENCY_NAME=FIL +NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL=FIL +NEXT_PUBLIC_NETWORK_EXPLORERS=[{'title':'GeckoTerminal','logo':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/explorer-logos/geckoterminal.png','baseUrl':'https://www.geckoterminal.com/','paths':{'token':'/filecoin/pools'}}] +NEXT_PUBLIC_NETWORK_ICON=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-icons/filecoin-icon-dark.svg +NEXT_PUBLIC_NETWORK_ICON_DARK=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-icons/filecoin-icon-light.svg +NEXT_PUBLIC_NETWORK_ID=314 +NEXT_PUBLIC_NETWORK_LOGO=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-logos/filecoin-logo-dark.svg +NEXT_PUBLIC_NETWORK_LOGO_DARK=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-logos/filecoin-logo-light.svg +NEXT_PUBLIC_NETWORK_NAME=Filecoin Virtual Machine +NEXT_PUBLIC_NETWORK_RPC_URL=https://rpc.ankr.com/filecoin +NEXT_PUBLIC_NETWORK_SHORT_NAME=Filecoin Virtual Machine +NEXT_PUBLIC_OG_ENHANCED_DATA_ENABLED=true +NEXT_PUBLIC_OG_IMAGE_URL=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/og-images/filecoin.png +NEXT_PUBLIC_STATS_API_HOST=https://stats-filecoin.k8s-prod-1.blockscout.com +NEXT_PUBLIC_TRANSACTION_INTERPRETATION_PROVIDER=blockscout +NEXT_PUBLIC_VISUALIZE_API_HOST=https://visualizer.services.blockscout.com \ No newline at end of file diff --git a/configs/envs/.env.gnosis b/configs/envs/.env.gnosis index dead77d742..7e1d1e6993 100644 --- a/configs/envs/.env.gnosis +++ b/configs/envs/.env.gnosis @@ -1,6 +1,6 @@ # Set of ENVs for Gnosis chain network explorer # https://gnosis.blockscout.com -# This is an auto-generated file. To update all values, run "yarn preset:sync --name=gnosis" +# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=gnosis" # Local ENVs NEXT_PUBLIC_APP_PROTOCOL=http diff --git a/configs/envs/.env.main b/configs/envs/.env.main index e9d31eedb2..0568827c78 100644 --- a/configs/envs/.env.main +++ b/configs/envs/.env.main @@ -1,6 +1,6 @@ # Set of ENVs for Sepolia network explorer # https://eth-sepolia.k8s-dev.blockscout.com -# This is an auto-generated file. To update all values, run "yarn preset:sync --name=main" +# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=main" # Local ENVs NEXT_PUBLIC_APP_PROTOCOL=http diff --git a/configs/envs/.env.optimism b/configs/envs/.env.optimism index 45f46dc01e..8fd9911afc 100644 --- a/configs/envs/.env.optimism +++ b/configs/envs/.env.optimism @@ -1,6 +1,6 @@ # Set of ENVs for OP Mainnet network explorer # https://optimism.blockscout.com -# This is an auto-generated file. To update all values, run "yarn preset:sync --name=optimism" +# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=optimism" # Local ENVs NEXT_PUBLIC_APP_PROTOCOL=http diff --git a/configs/envs/.env.optimism_celestia b/configs/envs/.env.optimism_celestia index cb66ee2c0b..650975e1c1 100644 --- a/configs/envs/.env.optimism_celestia +++ b/configs/envs/.env.optimism_celestia @@ -1,6 +1,6 @@ # Set of ENVs for OP Celestia Raspberry network explorer # https://opcelestia-raspberry.gelatoscout.com -# This is an auto-generated file. To update all values, run "yarn preset:sync --name=optimism_celestia" +# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=optimism_celestia" # Local ENVs NEXT_PUBLIC_APP_PROTOCOL=http diff --git a/configs/envs/.env.optimism_sepolia b/configs/envs/.env.optimism_sepolia index 8636924480..146b064965 100644 --- a/configs/envs/.env.optimism_sepolia +++ b/configs/envs/.env.optimism_sepolia @@ -1,6 +1,6 @@ # Set of ENVs for OP Sepolia network explorer # https://optimism-sepolia.blockscout.com -# This is an auto-generated file. To update all values, run "yarn preset:sync --name=optimism_sepolia" +# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=optimism_sepolia" # Local ENVs NEXT_PUBLIC_APP_PROTOCOL=http diff --git a/configs/envs/.env.polygon b/configs/envs/.env.polygon index 4fe0631ac0..ddd94291fc 100644 --- a/configs/envs/.env.polygon +++ b/configs/envs/.env.polygon @@ -1,6 +1,6 @@ # Set of ENVs for Polygon Mainnet network explorer # https://polygon.blockscout.com -# This is an auto-generated file. To update all values, run "yarn preset:sync --name=polygon" +# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=polygon" # Local ENVs NEXT_PUBLIC_APP_PROTOCOL=http diff --git a/configs/envs/.env.rootstock_testnet b/configs/envs/.env.rootstock_testnet index a4218a2fac..06368491ef 100644 --- a/configs/envs/.env.rootstock_testnet +++ b/configs/envs/.env.rootstock_testnet @@ -1,6 +1,6 @@ # Set of ENVs for Rootstock Testnet network explorer # https://rootstock-testnet.blockscout.com -# This is an auto-generated file. To update all values, run "yarn preset:sync --name=rootstock_testnet" +# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=rootstock_testnet" # Local ENVs NEXT_PUBLIC_APP_PROTOCOL=http diff --git a/configs/envs/.env.stability_testnet b/configs/envs/.env.stability_testnet index c057fda27c..e96ca8462d 100644 --- a/configs/envs/.env.stability_testnet +++ b/configs/envs/.env.stability_testnet @@ -1,6 +1,6 @@ # Set of ENVs for Stability Testnet network explorer # https://stability-testnet.blockscout.com -# This is an auto-generated file. To update all values, run "yarn preset:sync --name=stability_testnet" +# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=stability_testnet" # Local ENVs NEXT_PUBLIC_APP_PROTOCOL=http diff --git a/configs/envs/.env.zkevm b/configs/envs/.env.zkevm index 8b7dc2e566..65db320a6b 100644 --- a/configs/envs/.env.zkevm +++ b/configs/envs/.env.zkevm @@ -1,6 +1,6 @@ # Set of ENVs for Polygon zkEVM network explorer # https://zkevm.blockscout.com -# This is an auto-generated file. To update all values, run "yarn preset:sync --name=zkevm" +# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=zkevm" # Local ENVs NEXT_PUBLIC_APP_PROTOCOL=http diff --git a/configs/envs/.env.zksync b/configs/envs/.env.zksync index 0638d13b80..f7b18c0548 100644 --- a/configs/envs/.env.zksync +++ b/configs/envs/.env.zksync @@ -1,6 +1,6 @@ # Set of ENVs for ZkSync Era network explorer # https://zksync.blockscout.com -# This is an auto-generated file. To update all values, run "yarn preset:sync --name=zksync" +# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=zksync" # Local ENVs NEXT_PUBLIC_APP_PROTOCOL=http diff --git a/mocks/address/address.ts b/mocks/address/address.ts index e58097c2f5..112f774ba0 100644 --- a/mocks/address/address.ts +++ b/mocks/address/address.ts @@ -157,3 +157,12 @@ export const validator: Address = { watchlist_address_id: null, ens_domain_name: null, }; + +export const filecoin = { + ...validator, + filecoin: { + actor_type: 'evm' as const, + id: 'f02977693', + robust: 'f410fuiwj6a3yxajbohrl5vu6ns6o2e2jriul52lvzci', + }, +}; diff --git a/tools/preset-sync/index.ts b/tools/preset-sync/index.ts index ab19ee3469..3c61bfdcbe 100755 --- a/tools/preset-sync/index.ts +++ b/tools/preset-sync/index.ts @@ -11,6 +11,7 @@ const PRESETS = { eth_goerli: 'https://eth-goerli.blockscout.com', eth_sepolia: 'https://eth-sepolia.blockscout.com', garnet: 'https://explorer.garnetchain.com', + filecoin: 'https://filecoin.blockscout.com', gnosis: 'https://gnosis.blockscout.com', optimism: 'https://optimism.blockscout.com', optimism_celestia: 'https://opcelestia-raspberry.gelatoscout.com', @@ -75,7 +76,7 @@ function updateFileContent(envsEntries: Array<[ string, string ]>, presetId: key const content = `# Set of ENVs for ${ chainName } network explorer\n` + '# ' + explorerUrl + '\n' + - `# This is an auto-generated file. To update all values, run "yarn preset:sync --name=${ presetId }"\n` + + `# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=${ presetId }"\n` + '\n' + '# Local ENVs\n' + localEnvsContent + '\n' + diff --git a/types/api/address.ts b/types/api/address.ts index 733350cc93..c20b3eb034 100644 --- a/types/api/address.ts +++ b/types/api/address.ts @@ -1,6 +1,6 @@ import type { Transaction } from 'types/api/transaction'; -import type { UserTags, AddressImplementation, AddressParam } from './addressParams'; +import type { UserTags, AddressImplementation, AddressParam, AddressFilecoinParams } from './addressParams'; import type { Block, EpochRewardsType } from './block'; import type { InternalTransaction } from './internalTransaction'; import type { MudWorldSchema, MudWorldTable } from './mudWorlds'; @@ -11,9 +11,11 @@ export interface Address extends UserTags { block_number_balance_updated_at: number | null; coin_balance: string | null; creator_address_hash: string | null; + creator_filecoin_robust_address?: string | null; creation_tx_hash: string | null; exchange_rate: string | null; ens_domain_name: string | null; + filecoin?: AddressFilecoinParams; // TODO: if we are happy with tabs-counters method, should we delete has_something fields? has_beacon_chain_withdrawals?: boolean; has_decompiled_code: boolean; diff --git a/types/api/addressParams.ts b/types/api/addressParams.ts index 069302e808..1ccbd9273f 100644 --- a/types/api/addressParams.ts +++ b/types/api/addressParams.ts @@ -16,6 +16,30 @@ export interface WatchlistName { display_name: string; } +export type AddressFilecoinParams = { + actor_type?: FilecoinActorType; + id?: string | null; + robust?: string | null; +} + +export type FilecoinActorType = + 'account' | + 'cron' | + 'datacap' | + 'eam' | + 'ethaccount' | + 'evm' | + 'init' | + 'market' | + 'miner' | + 'multisig' | + 'paych' | + 'placeholder' | + 'power' | + 'reward' | + 'system' | + 'verifreg'; + export interface UserTags { private_tags: Array | null; watchlist_names: Array | null; @@ -33,6 +57,7 @@ export type AddressParamBasic = { reputation: number | null; tags: Array; } | null; + filecoin?: AddressFilecoinParams; } export type AddressParam = UserTags & AddressParamBasic; diff --git a/types/api/contract.ts b/types/api/contract.ts index f1e937d866..8ae7cbd9d5 100644 --- a/types/api/contract.ts +++ b/types/api/contract.ts @@ -67,6 +67,7 @@ export interface SmartContract { remappings?: Array; }; verified_twin_address_hash: string | null; + verified_twin_filecoin_robust_address?: string | null; proxy_type: SmartContractProxyType | null; language: string | null; license_type: SmartContractLicenseType | null; diff --git a/types/api/search.ts b/types/api/search.ts index 7d738e7cbd..7572c60060 100644 --- a/types/api/search.ts +++ b/types/api/search.ts @@ -15,6 +15,7 @@ export interface SearchResultToken { total_supply: string | null; is_verified_via_admin_panel: boolean; is_smart_contract_verified: boolean; + filecoin_robust_address?: string | null; } export interface SearchResultAddressOrContract { @@ -23,6 +24,7 @@ export interface SearchResultAddressOrContract { address: string; is_smart_contract_verified: boolean; certified?: true; + filecoin_robust_address?: string | null; url?: string; // not used by the frontend, we build the url ourselves ens_info?: { address_hash: string; @@ -36,6 +38,7 @@ export interface SearchResultDomain { type: 'ens_domain'; name: string | null; address: string; + filecoin_robust_address?: string | null; is_smart_contract_verified: boolean; url?: string; // not used by the frontend, we build the url ourselves ens_info: { @@ -49,6 +52,7 @@ export interface SearchResultDomain { export interface SearchResultLabel { type: 'label'; address: string; + filecoin_robust_address?: string | null; name: string; is_smart_contract_verified: boolean; url?: string; // not used by the frontend, we build the url ourselves diff --git a/types/api/token.ts b/types/api/token.ts index 58d4e484fb..c321667b57 100644 --- a/types/api/token.ts +++ b/types/api/token.ts @@ -20,6 +20,7 @@ export interface TokenInfo { bridge_type?: string | null; origin_chain_id?: string | null; foreign_address?: string | null; + filecoin_robust_address?: string | null; } export interface TokenCounters { diff --git a/ui/address/AddressDetails.pw.tsx b/ui/address/AddressDetails.pw.tsx index 7d49ae723d..9c7a14917d 100644 --- a/ui/address/AddressDetails.pw.tsx +++ b/ui/address/AddressDetails.pw.tsx @@ -44,6 +44,17 @@ test.describe('mobile', () => { }); }); + test('filecoin', async({ render, mockApiResponse, page }) => { + await mockApiResponse('address', addressMock.filecoin, { pathParams: { hash: ADDRESS_HASH } }); + await mockApiResponse('address_counters', countersMock.forValidator, { pathParams: { hash: ADDRESS_HASH } }); + + const component = await render(, { hooksConfig }); + + await expect(component).toHaveScreenshot({ + mask: [ page.locator(pwConfig.adsBannerSelector) ], + maskColor: pwConfig.maskColor, + }); + }); }); test('contract', async({ render, page, mockApiResponse }) => { @@ -92,3 +103,15 @@ test('validator', async({ render, mockApiResponse, page }) => { maskColor: pwConfig.maskColor, }); }); + +test('filecoin', async({ render, mockApiResponse, page }) => { + await mockApiResponse('address', addressMock.filecoin, { pathParams: { hash: ADDRESS_HASH } }); + await mockApiResponse('address_counters', countersMock.forValidator, { pathParams: { hash: ADDRESS_HASH } }); + + const component = await render(, { hooksConfig }); + + await expect(component).toHaveScreenshot({ + mask: [ page.locator(pwConfig.adsBannerSelector) ], + maskColor: pwConfig.maskColor, + }); +}); diff --git a/ui/address/AddressDetails.tsx b/ui/address/AddressDetails.tsx index e781f5b519..613f31e74c 100644 --- a/ui/address/AddressDetails.tsx +++ b/ui/address/AddressDetails.tsx @@ -10,6 +10,7 @@ import getQueryParamString from 'lib/router/getQueryParamString'; import AddressCounterItem from 'ui/address/details/AddressCounterItem'; import ServiceDegradationWarning from 'ui/shared/alerts/ServiceDegradationWarning'; import isCustomAppError from 'ui/shared/AppError/isCustomAppError'; +import CopyToClipboard from 'ui/shared/CopyToClipboard'; import DataFetchAlert from 'ui/shared/DataFetchAlert'; import * as DetailsInfoItem from 'ui/shared/DetailsInfoItem'; import DetailsSponsoredItem from 'ui/shared/DetailsSponsoredItem'; @@ -22,6 +23,7 @@ import AddressImplementations from './details/AddressImplementations'; import AddressNameInfo from './details/AddressNameInfo'; import AddressNetWorth from './details/AddressNetWorth'; import AddressSaveOnGas from './details/AddressSaveOnGas'; +import FilecoinActorTag from './filecoin/FilecoinActorTag'; import TokenSelect from './tokenSelect/TokenSelect'; import useAddressCountersQuery from './utils/useAddressCountersQuery'; import type { AddressQuery } from './utils/useAddressQuery'; @@ -63,6 +65,9 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => { has_tokens: true, has_token_transfers: true, has_validated_blocks: false, + filecoin: undefined, + creator_filecoin_robust_address: null, + creator_address_hash: null, }), [ addressHash ]); // error handling (except 404 codes) @@ -83,6 +88,8 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => { return null; } + const creatorAddressHash = data.creator_address_hash; + return ( <> { addressQuery.isDegradedData && } @@ -91,9 +98,53 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => { rowGap={{ base: 1, lg: 3 }} templateColumns={{ base: 'minmax(0, 1fr)', lg: 'auto minmax(0, 1fr)' }} overflow="hidden" > + { data.filecoin?.id && ( + <> + + ID + + + { data.filecoin.id } + + + + ) } + + { data.filecoin?.actor_type && ( + <> + + Actor + + + + + + ) } + + { (data.filecoin?.actor_type === 'evm' || data.filecoin?.actor_type === 'ethaccount') && data?.filecoin?.robust && ( + <> + + Ethereum Address + + + + + + ) } + - { data.is_contract && data.creation_tx_hash && data.creator_address_hash && ( + { data.is_contract && data.creation_tx_hash && (creatorAddressHash) && ( <> { diff --git a/ui/address/__screenshots__/AddressDetails.pw.tsx_default_filecoin-1.png b/ui/address/__screenshots__/AddressDetails.pw.tsx_default_filecoin-1.png new file mode 100644 index 0000000000..d657ae1500 Binary files /dev/null and b/ui/address/__screenshots__/AddressDetails.pw.tsx_default_filecoin-1.png differ diff --git a/ui/address/__screenshots__/AddressDetails.pw.tsx_default_mobile-filecoin-1.png b/ui/address/__screenshots__/AddressDetails.pw.tsx_default_mobile-filecoin-1.png new file mode 100644 index 0000000000..27606137f4 Binary files /dev/null and b/ui/address/__screenshots__/AddressDetails.pw.tsx_default_mobile-filecoin-1.png differ diff --git a/ui/address/contract/alerts/ContractDetailsAlerts.tsx b/ui/address/contract/alerts/ContractDetailsAlerts.tsx index ed040c94a1..cf71876d79 100644 --- a/ui/address/contract/alerts/ContractDetailsAlerts.tsx +++ b/ui/address/contract/alerts/ContractDetailsAlerts.tsx @@ -72,7 +72,7 @@ const ContractDetailsAlerts = ({ data, isLoading, addressHash, channel }: Props) Contract is not verified. However, we found a verified contract with the same bytecode in Blockscout DB = { + account: 'Account', + cron: 'Scheduled Tasks', + datacap: 'Data Cap Management', + eam: 'Ethereum Address Manager', + ethaccount: 'Ethereum-Compatible Account', + evm: 'Ethereum Virtual Machine', + init: 'Initialization', + market: 'Storage Market', + miner: 'Storage Provider', + multisig: 'Multi-Signature Wallet', + paych: 'Payment Channel', + placeholder: 'Placeholder Address', + power: 'Power Management', + reward: 'Incentives and Rewards', + system: 'System Operations', + verifreg: 'Verification Registry', +}; + +type Props = { + actorType: FilecoinActorType; +} + +const FilecoinActorTag = ({ actorType }: Props) => { + const text = ACTOR_TYPES[actorType]; + + if (!text) { + return null; + } + + return { text }; +}; + +export default FilecoinActorTag; diff --git a/ui/pages/Address.tsx b/ui/pages/Address.tsx index 854a364e63..6c87ecfd2b 100644 --- a/ui/pages/Address.tsx +++ b/ui/pages/Address.tsx @@ -346,7 +346,13 @@ const AddressPageContent = () => { /> ) } { { !isLoading && !addressQuery.data?.is_contract && config.features.account.isEnabled && ( ) } - + { !isLoading && addressQuery.data?.is_contract && addressQuery.data?.is_verified && config.UI.views.address.solidityscanEnabled && diff --git a/ui/searchResults/SearchResultListItem.tsx b/ui/searchResults/SearchResultListItem.tsx index 80eb840300..45aa6c76a1 100644 --- a/ui/searchResults/SearchResultListItem.tsx +++ b/ui/searchResults/SearchResultListItem.tsx @@ -80,6 +80,9 @@ const SearchResultListItem = ({ data, searchTerm, isLoading }: Props) => { const shouldHighlightHash = ADDRESS_REGEXP.test(searchTerm); const address = { hash: data.address, + filecoin: { + robust: data.filecoin_robust_address, + }, is_contract: data.type === 'contract', is_verified: data.is_smart_contract_verified, name: null, @@ -288,7 +291,7 @@ const SearchResultListItem = ({ data, searchTerm, isLoading }: Props) => { - + { data.is_smart_contract_verified && } @@ -333,7 +336,7 @@ const SearchResultListItem = ({ data, searchTerm, isLoading }: Props) => { return ( - + { data.is_smart_contract_verified && } @@ -384,7 +387,7 @@ const SearchResultListItem = ({ data, searchTerm, isLoading }: Props) => { return ( - + { data.ens_info.names_count > 1 ? diff --git a/ui/searchResults/SearchResultTableItem.tsx b/ui/searchResults/SearchResultTableItem.tsx index ae24e3e7d2..5b13563aca 100644 --- a/ui/searchResults/SearchResultTableItem.tsx +++ b/ui/searchResults/SearchResultTableItem.tsx @@ -77,7 +77,7 @@ const SearchResultTableItem = ({ data, searchTerm, isLoading }: Props) => { - + { data.is_smart_contract_verified && } @@ -100,6 +100,9 @@ const SearchResultTableItem = ({ data, searchTerm, isLoading }: Props) => { const addressName = data.name || data.ens_info?.name; const address = { hash: data.address, + filecoin: { + robust: data.filecoin_robust_address, + }, is_contract: data.type === 'contract', is_verified: data.is_smart_contract_verified, name: null, @@ -174,7 +177,7 @@ const SearchResultTableItem = ({ data, searchTerm, isLoading }: Props) => { - + { data.is_smart_contract_verified && } @@ -392,7 +395,7 @@ const SearchResultTableItem = ({ data, searchTerm, isLoading }: Props) => { - + { data.is_smart_contract_verified && } diff --git a/ui/shared/entities/address/AddressEntity.tsx b/ui/shared/entities/address/AddressEntity.tsx index 514100ecf1..422929e3f3 100644 --- a/ui/shared/entities/address/AddressEntity.tsx +++ b/ui/shared/entities/address/AddressEntity.tsx @@ -77,7 +77,7 @@ const Icon = (props: IconProps) => { ); @@ -99,7 +99,7 @@ const Content = chakra((props: ContentProps) => { const label = ( { nameText } - { props.address.hash } + { props.address.filecoin?.robust ?? props.address.hash } ); @@ -115,7 +115,7 @@ const Content = chakra((props: ContentProps) => { return ( ); }); @@ -126,7 +126,7 @@ const Copy = (props: CopyProps) => { return ( ); }; diff --git a/ui/shared/entities/address/AddressEntityContentProxy.tsx b/ui/shared/entities/address/AddressEntityContentProxy.tsx index 66fbb4146f..73039f71cc 100644 --- a/ui/shared/entities/address/AddressEntityContentProxy.tsx +++ b/ui/shared/entities/address/AddressEntityContentProxy.tsx @@ -46,7 +46,7 @@ const AddressEntityContentProxy = (props: ContentProps) => { Proxy contract { props.address.name ? ` (${ props.address.name })` : '' } - + Implementation{ implementations.length > 1 ? 's' : '' } { implementationName ? ` (${ implementationName })` : '' } diff --git a/ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestAddress.tsx b/ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestAddress.tsx index ef22025c2e..4304e095de 100644 --- a/ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestAddress.tsx +++ b/ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestAddress.tsx @@ -52,7 +52,7 @@ const SearchBarSuggestAddress = ({ data, isMobile, searchTerm }: Props) => { { data.certified && } ); - const addressEl = ; + const addressEl = ; if (isMobile) { return ( diff --git a/ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestDomain.tsx b/ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestDomain.tsx index 2ec60ccc8d..37b2de65b1 100644 --- a/ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestDomain.tsx +++ b/ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestDomain.tsx @@ -34,7 +34,7 @@ const SearchBarSuggestDomain = ({ data, isMobile, searchTerm }: Props) => { whiteSpace="nowrap" variant="secondary" > - + ); diff --git a/ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestLabel.tsx b/ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestLabel.tsx index 1e1ffcadb9..dbb98005b4 100644 --- a/ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestLabel.tsx +++ b/ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestLabel.tsx @@ -33,7 +33,7 @@ const SearchBarSuggestLabel = ({ data, isMobile, searchTerm }: Props) => { whiteSpace="nowrap" variant="secondary" > - + ); diff --git a/ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestToken.tsx b/ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestToken.tsx index 67e31f239c..78d23f9f78 100644 --- a/ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestToken.tsx +++ b/ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestToken.tsx @@ -30,7 +30,7 @@ const SearchBarSuggestToken = ({ data, isMobile, searchTerm }: Props) => { const address = ( - + ); diff --git a/ui/tokenInstance/details/TokenInstanceCreatorAddress.tsx b/ui/tokenInstance/details/TokenInstanceCreatorAddress.tsx index bab4c00800..276fe95010 100644 --- a/ui/tokenInstance/details/TokenInstanceCreatorAddress.tsx +++ b/ui/tokenInstance/details/TokenInstanceCreatorAddress.tsx @@ -28,6 +28,9 @@ const TokenInstanceCreatorAddress = ({ hash }: Props) => { const creatorAddress = { hash: addressQuery.data.creator_address_hash, + filecoin: { + robust: addressQuery.data.creator_filecoin_robust_address, + }, is_contract: false, implementations: null, }; diff --git a/ui/tokens/TokensListItem.tsx b/ui/tokens/TokensListItem.tsx index b0cbfdd352..9ddfa612ba 100644 --- a/ui/tokens/TokensListItem.tsx +++ b/ui/tokens/TokensListItem.tsx @@ -32,6 +32,7 @@ const TokensTableItem = ({ const { address, + filecoin_robust_address: filecoinRobustAddress, exchange_rate: exchangeRate, type, holders, @@ -70,7 +71,7 @@ const TokensTableItem = ({ { { data.certified && } - + - + Balance { currencyUnits.ether } diff --git a/ui/verifiedContracts/VerifiedContractsTableItem.tsx b/ui/verifiedContracts/VerifiedContractsTableItem.tsx index 0282dea6ca..2771a07f55 100644 --- a/ui/verifiedContracts/VerifiedContractsTableItem.tsx +++ b/ui/verifiedContracts/VerifiedContractsTableItem.tsx @@ -46,9 +46,9 @@ const VerifiedContractsTableItem = ({ data, isLoading }: Props) => { - + - +