Providers

Blockscout

Keyless and complete on ten EVM chains, one host per chain. The backstop when nothing else serves a chain and the first stop when there are no keys.
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-balances returns the complete holding array. A busy wallet makes that an answer of several megabytes, so this one read allows sixty seconds unless ProviderConfig.timeout overrides it.
  • It is the final fallback. resolveProvider() returns Blockscout for a chain nobody serves, and the answer is then an UnsupportedChainError naming 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.

@agntn/explorers·MIT license· Read-only. Addresses you type go to a public explorer API, never to a wallet.