49 Commits
Author SHA1 Message Date
zeekay 16c8d71a90 bridge: stop printing four numbers nobody measured, and drop the dead SDK with them
/bridge showed CONNECTED CHAINS 14, BRIDGE ROUTES 4, BRIDGE SIGNERS 5, ACTIVE
ROUTES 4 — the same four values on lux, hanzo and zoo, while its only backing
RPC 404'd twice per page load. Not one was measured:

  * Connected Chains counted the keys of CHAIN_LABELS, a hardcoded lookup table,
    plus an L1 list that comes back empty. It is 14 because the map has 14
    entries.
  * Bridge Routes and Active Routes counted four pairs unshifted into an array
    three lines above, each hardcoded status: 'active'.
  * Bridge Signers asked the B-Chain and, when that failed, printed the P-Chain
    VALIDATOR count under a signer label. A real number, under the wrong name —
    the worst of the four, because it moves.

The B-Chain is not served on any prefix: api.<brand>.network answers 404 to
/ext/bc/B/rpc and to /v1/bc/B/rpc alike, so there is no live bridge data to
show and the page has been reporting constants as measurements. Fixing the
path would have moved the 404, not the lie.

So the cards are gone, and with them lib/api/bchain, whose whole job was to
swallow that failure into zeroes. That leaves lib/api/luxnet with no caller —
the P-Chain hooks go through the /v1/pchain proxy, and getPChain/getInfo/
getHealth were re-exported and never called — so it goes too, and the luxnet
dependency with it: 889 lines of lockfile, an elliptic-curve SDK this app
never used at runtime. The retired /ext/ prefix now has no caller here at all.

What stays is what is true: the routes table, C/P/X atomic swaps marked active
and L1 transfers marked coming soon, and the paragraph that says so.

Measured, 1440x900: before, two POST https://api.lux.network/ext/bc/B/rpc per
load, both 404, four stat cards reading 14/4/5/4. After, zero /ext/ or /bc/
requests, zero stat cards, the four route rows unchanged.

Also: name every field when a broadcast becomes a block. toApiBlock spread the
raw EVMBlock and renamed three keys, so gas_used, gas_limit, base_fee_per_gas
and parent_hash stayed camelCase and arrived undefined — a live-pushed row
rendered 0 gas beside REST rows showing the real number, the same block reading
two ways depending on how it got here. It now builds the API shape explicitly,
field for field, matching formatBlock in luxfi/indexer.
2026-08-08 06:44:20 -07:00
zeekay 2e1012b761 fix(home): map the realtime block onto the API shape before it reaches the list
The home page rendered the error boundary — "Oops! Something went wrong" —
within seconds of loading, on every explorer in the estate, with no interaction
at all:

  TypeError: Cannot read properties of undefined (reading 'length')
      at HashStringShorten (ui/shared/HashStringShorten.tsx:17)

The list on the home page is filled from the REST API and then kept current by
the realtime stream, and the two do not agree on what a block looks like.
/main-page/blocks answers with the API shape — `height`, and `miner` as an
address object. The indexer broadcasts a raw EVM block:

  data: {"event":"blocks","chain":"cchain","data":{
    "number":1090152,"miner":"0x0100...","txCount":4, ... }}

`new_block` put that straight into the same query cache, so LatestBlocksItem
handed `AddressEntity` a bare string. `address.hash` on a string is undefined,
the entity passed undefined down as its text, and HashStringShorten read
`.length` off it. Instrumented in a dev build: the four blocks that arrive over
the stream log `miner` as a string with no `height`, against six from REST that
carry both — and exactly four entities then render with no text.

TRANSLATIONS already exists as the one place a backend broadcast becomes app
data, and it already has a transform hook, so the shape is settled there rather
than at each reader. Everything downstream keeps knowing exactly one block
shape, which is what it already assumed.

The spec asserted the raw passthrough, so it encoded the bug; it now asserts
the mapped shape and covers `miner` specifically.
2026-08-06 12:20:11 -07:00
zeekay 507a7da852 fix(realtime): swap Phoenix WebSocket transport for backend SSE
The FE connected realtime via Phoenix Channels (wss .../socket/v2), but the
Go backend serves no Phoenix endpoint — its realtime is SSE at
/v1/base/realtime (envelope {event,chain,data}). Result: repeating ws 404 ->
'Live updates temporarily delayed'.

lib/socket/sse.ts reimplements the slice of the Phoenix Socket/Channel API the
27 realtime consumers use, backed by one EventSource, behind the existing
SocketProvider/useSocketChannel/useSocketMessage seam — no consumer changes.
Envelope routes via an optional topic field or a hub-channel translation table
(blocks -> blocks:new_block/new_block today). CT harness becomes a tiny SSE
server with the same signatures. 12 vitest cases cover it.

Frontend-only; chain/indexer untouched. Data freshness remains gated on the
separate C-Chain-rollback/indexer-reorg owner items.
2026-06-28 09:01:10 -07:00
zeekay da79f9e711 feat: rename @blockscout to @luxfi, monochrome theme, horizontal blocks
- Rename all @blockscout/* npm packages to @luxfi/* aliases (150+ files)
- Override blue accent colors to gray for monochrome theme
- Fix dropdown/menu/popover fonts to use Geist Sans
- Change Latest Blocks to horizontal scrolling layout
- Show dashes instead of zeros for validator stats on error
- Fix GHA deploy step to use correct deployment name
2026-03-02 12:28:15 -08:00
Igor StuevandGitHub 0f4e29e4d0 zeta chain cctx (#2904)
* zetachain start

* zeta chain cctx table

* pagination

* cctx page init

* meta for new route

* remove backlink

* schema

* continue

* fix

* navigation

* filters to test

* some fixes

* add chain filter

* add error message and revert options

* address chain logo fix

* cctx search

* socket

* fix conflict

* fixes1

* fixes2

* fixes3

* fixes4

* fixes5

* tests

* fixes6

* test fixes

* revert options fix

* stats and revert semi-fix

* fix readme

* cleanup

* check for cctx in lifecycle

* update config

* fixes 8

* fixes 9

* update config

* fixes10
2025-09-05 15:53:00 +02:00
tom goriunovandGitHub c43a94d211 Contract tab: finding matching bytecode states (#2680)
* Contract tab: finding matching bytecode states

Fixes #2678

* handle case when there is only one sub-tab on contract tab

* tests

* prevent calling the smart contract resource twice when opening the tab

* [wip] add debug logs

* change api host for op sepolia

* rollback debug and update screenshots
2025-07-24 13:40:41 +02:00
tom goriunovandGitHub ca4c8d6633 OP Superchain Explorer: MVP (#2786)
* context for storing subchain config and tx view for subchain

* address page and block page for subchain

* address aggregated page: local txs tab

* connect MultichainSelect to context

* home page placeholder

* refactor subchain select state

* envs for demo

* fix ts

* clear value for l2 review

* subchain widgets on home page

* csp policies

* sockets, duck and goose

* fix socket on subchain address page

* link builder for subchain views

* update home widget

* fix time increment

* enable tx interpretator and metadata service

* generate multichain config based on every chain app config

* Fix the multichain config to work in Docker

* multichain socket test

* rename subchain-id to subchain-slug path param

* refactoring

* update chain icons on entities

* home page: latest local txs

* latest cross-chain txs

* minor improvements

* renaming, pt. 1

* rename chain routes

* enable blockchain interaction

* add loading state to icon shield

* fix build

* fix tests

* update types package
2025-07-03 15:07:00 +02:00
e6ff66b084 Bump react to v19 (#2782)
Co-authored-by: tom <[email protected]>
2025-06-11 20:03:31 +02:00
tom goriunovandGitHub d08ffecb34 Socket updates: on-demand contract verification fix, indexing event rename (#2629)
* Contract verification not appearing as completed following the message from websocket

Fixes #2618

* fix tests

* Change indexing status event name

* Replace `optimism_deposits:new_deposits` socket topic with `optimism:new_deposits`
2025-03-24 18:20:03 +01:00
tom 125c4880de migrate to eslint 9 and its flat config 2024-11-13 12:54:12 +01:00
isstuev 76dbe8919f arbitrum latest batches and deposits 2024-08-04 19:58:20 +02:00
tom goriunovandGitHub 19ddd87083 Implement NFT instance metadata refetch button (#2039)
* refactor token instance page title

* add menu item and modal with recaptcha

* initialize refresh and show loading state

* handle error state

* fix metadata atributes parser

* refactoring

* tests
2024-06-25 18:19:39 +02:00
f1b741a079 Get smart-contract bytecode from websocket (#1851)
* Get smart-contract bytecode from websocket

Fixes #1769

* fix test

* i am stupid 😓

* Update values.yaml.gotmpl

---------

Co-authored-by: Yan Vaskov <[email protected]>
2024-05-06 19:13:10 +02:00
isstuev 01ed021fec Add support of ERC-404 type 2024-03-28 15:14:19 +04:00
tom goriunovandGitHub df7e1d209a Refactor rollup features (#1599)
* refactor ENVs and app feature

* rename l2 into optimisticL2

* [skip ci] fix validator schema
2024-02-12 17:35:22 +04:00
isstuev 85cce14e0f fixes 2 2023-10-23 23:14:57 +02:00
tom goriunovandGitHub f1f1277c17 support new socket events for token balances (#1082)
base implementation
2023-08-10 16:23:05 -04:00
tom goriunovandGitHub 5bf4bd97e7 support "smart_contract_was_verified" socket event (#1030)
* support "smart_contract_was_verified" socket event

Fixes #1024

* remove test since it is not working in docker
2023-07-20 15:41:11 -04:00
isstuev 2ec021d4ae change socket model 2023-05-29 17:34:05 -03:00
isstuev 8aef81fd4b deposits on homepage 2023-04-11 14:06:38 -03:00
isstuev c8acbc90d3 fix type 2023-04-05 09:48:32 -03:00
isstuev 00a832245d contract changed 2023-04-03 22:54:10 -03:00
isstuev 0898dcd3a7 raw traces 2023-04-03 22:53:23 -03:00
isstuev 446adc0e65 new sockets start 2023-04-03 16:26:48 -03:00
tom 9d6726b336 bring ts-reset 2023-02-24 12:37:08 -05:00
tom 5dac835703 error handling 2023-02-02 13:07:21 -05:00
tom cb91bde792 constructor args field 2023-02-02 10:19:26 -05:00
tom 23759d31b9 submit form to api 2023-02-01 17:39:30 -05:00
isstuev 4e15c0a18c socket + method 2023-01-18 19:04:30 -06:00
isstuev 7e8b248ef2 token transfer socket 2023-01-17 13:24:39 -06:00
isstuev 4f3d6d0913 address txs socket 2023-01-17 13:23:58 -06:00
isstuev 2adb78dcf4 indexing alert 2022-12-16 13:13:48 +03:00
tom b95373a889 add socket 2022-12-13 12:14:18 +03:00
tom 4b6b4a5a34 Merge branch 'main' of github.com:blockscout/frontend into address-balance 2022-12-13 10:55:50 +03:00
tom 6766aad208 address balance and name 2022-12-09 13:17:14 +03:00
tom cfcecd2ad2 Merge branch 'main' of github.com:blockscout/frontend into custom-select 2022-12-08 12:37:20 +03:00
tom 2a1826fa4b multiple channel subscriberes on one page 2022-12-07 11:22:44 +03:00
tom ad1a099f25 rewrite tests 2022-12-06 19:12:18 +03:00
tom b99c2f0ede data refetching 2022-12-06 17:26:04 +03:00
tom ab452422f2 tests for block socket 2022-11-28 15:43:22 +03:00
tom ae801c5789 socket for txs 2022-11-08 10:35:17 +03:00
tom 8fef4dbc0d fixes 2022-11-03 17:31:03 +03:00
tom 861d9bfc9b better clean-up 2022-11-03 17:22:41 +03:00
tom bd73c40177 rewrite using phoenix lib 2022-11-03 13:16:12 +03:00
tom bae5df0a63 tx socket 2022-11-03 11:03:49 +03:00
tom b3f0358013 add socket to block list 2022-11-02 18:10:34 +03:00
tom 4cf7680799 more types 2022-11-02 16:27:45 +03:00
tom a8e98d52eb construct api socket url 2022-11-02 13:41:09 +03:00
tom eed8a23f3c rewrite to class 2022-11-02 13:27:00 +03:00