Blockscout
- provider
- create("blockscout")
- auth
- none
- chains
- Ethereum, Base, Arbitrum One, Optimism, Polygon PoS, Gnosis Chain, Linea, Scroll, zkSync Era, Avalanche C-Chain
- capabilities
- balance, history, tx detail, contract, tokens, transfers, gas, block
- endpoint
- eth.blockscout.com
- default chain
- ethereum
Address it
const blockscout = await create("blockscout");
await blockscout.getTokenBalances("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "ethereum", {
nonZeroOnly: true,
});
No key, no configuration. Each chain has its own Blockscout host, eth.blockscout.com, base.blockscout.com and so on, and the provider picks the host from the chain.
What it reads
The REST v2 API under /api/v2: /addresses/:address for the balance, /addresses/:address/transactions for history, /transactions/:hash for one, /smart-contracts/:address for contract metadata, /addresses/:address/token-balances for holdings, /addresses/:address/token-transfers for transfers, /stats for gas and /blocks/:number for a block.
Gotchas
/api/v2/addresses/:address/token-balancesreturns the complete holding array. A busy wallet makes that an answer of several megabytes, so this one read allows sixty seconds unlessProviderConfig.timeoutoverrides it.- It is the final fallback.
resolveProvider()returns Blockscout for a chain nobody serves, and the answer is then anUnsupportedChainErrornaming the chain, which is more useful than an unrelated provider's complaint. - Public instances rate limit generously but not infinitely. A 429 is a
RateLimitError; with an automatic selection the read moves on once.
Where it lives
src/providers/blockscout.ts.
Etherscan
The v2 API with one key for ten EVM chains and every operation. Five requests a second on the free tier, and the first choice whenever ETHERSCAN_API_KEY is set.
Blockchair
One dashboard API for Bitcoin, Ethereum and eCash. Works without a key, ranks higher with one, and is the only provider that names the block a balance was read at.