This blockexplorer is a client-only (i.e. serverless) block explorer, where the client makes RPC calls directly to the blockchain node.
- Search bar to directly query an address / transaction / block.
- Changeable RPC URL with chain ID verification.
- Custom known addresses for better UX.
- Light & dark theme support.
Clone the repo, and just yarn
. Then, yarn dev
to run the web app locally. Enter the RPC url and the chain ID to the settings button on the top right.
The connected node must support the following:
eth_blockNumber
eth_call
eth_getBalance
eth_getCode
eth_getBlockByHash
eth_getBlockByNumber
eth_getTransactionByHash
eth_getTransactionByBlockHashAndIndex
eth_getTransactionByBlockNumberAndIndex
eth_getTransactionReceipt
eth_getUncleByBlockHashAndIndex
eth_getLogs
Inspired from blockscout.
I looked through different options for block explorers -> Seems like there's 2 different main kinds.
- One that has an indexer and has a kinda complex setup and needs infra
- BlockScout - ($600/mo for their lowest production plan lol). For self hosting, setting up the infra seems like a pain.
- Explorer as a service providers
- RPC only (slow but needs no infra)
- Expedition - seems to be dead? Not updated for years
- Simple Block explorer (https://github.com/erhant/simple-blockexplorer) what I decided to start with.
- Had trouble finding other options for RPC only
How it works: Can pass in any l1 RPC url for the block explorer. The frontend gets the RPC url from the query params and sets it in context. Currently only accepts the RPC query param on the /
route but could be easily changed.
https://l1-explorer.vercel.app/?rpc=https://node.l1marketplace.com/ext/bc/5mEwEcPTRnezL4asCZSRx1ED1XB5dx8UyQNnuSWGR21C3awzB/rpc
Repo: https://github.com/multisig-labs/simple-blockexplorer