Blockscout
The Blockscout integration provides 40+ tools for querying indexed blockchain data. Blockscout is an open-source block explorer with a rich API that covers address history, transaction details, token transfers, NFT metadata, and verified contract ABIs.
All Blockscout tools use the blockscout_ prefix. No API key or configuration is required.
Supported Chains
Blockscout indexing is available on 8 chains:
| Chain | Chain ID |
|---|---|
| Ethereum | 1 |
| Polygon | 137 |
| Arbitrum | 42161 |
| Optimism | 10 |
| Base | 8453 |
| Gnosis | 100 |
| Scroll | 534352 |
| zkSync Era | 324 |
For chains not in this list, use EVM tools (evm_ prefix) to query live on-chain state directly.
Blockscout vs EVM Tools
These two integrations serve different purposes:
| Aspect | Blockscout | EVM |
|---|---|---|
| Data source | Indexed database | Live RPC node |
| Historical data | Yes (full history) | No (current state only) |
| Transaction history | Yes | No |
| Token transfers | Yes | No |
| NFT metadata | Yes | No |
| Contract ABIs | Yes (verified only) | No |
| Current balance | Yes | Yes |
| Contract reads | No | Yes |
| Contract writes | No | Yes |
| Speed | Fast (database query) | Depends on RPC |
Use Blockscout when you need history, transfers, or verified ABIs. Use EVM tools when you need live state or need to interact with contracts.
Tool Categories
Address Information
| Tool | Description |
|---|---|
blockscout_get_address_info | Address overview: balance, transaction count, token holdings |
blockscout_get_address_tokens | All ERC-20 tokens held by an address |
blockscout_get_address_nfts | All NFTs held by an address |
blockscout_get_address_coin_balance_history | Historical native token balance over time |
// Get full address overview
blockscout_get_address_info({
address: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
chainId: 1,
})
// Returns:
// {
// balance: "1234567890000000000",
// transactionCount: 1842,
// tokenHoldings: [...],
// isContract: false,
// isVerified: false
// }
Transaction History
| Tool | Description |
|---|---|
blockscout_get_address_transactions | Paginated transaction history for an address |
blockscout_get_transaction | Full details for a specific transaction hash |
blockscout_get_transaction_logs | Event logs emitted by a transaction |
blockscout_get_transaction_token_transfers | Token transfers within a transaction |
blockscout_get_internal_transactions | Internal (trace) transactions for an address |
blockscout_get_address_transactions({
address: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
chainId: 1,
page: 1,
limit: 25,
})
// Returns paginated list of transactions with:
// hash, from, to, value, gasUsed, timestamp, status, method
blockscout_get_transaction({
hash: "0xabc123...",
chainId: 8453,
})
// Returns full transaction details including decoded input data
Token Information
| Tool | Description |
|---|---|
blockscout_get_token_info | Token metadata: name, symbol, decimals, total supply, holders |
blockscout_get_token_holders | Paginated list of token holders with balances |
blockscout_get_token_transfers | Transfer history for a token contract |
blockscout_get_token_transfers_by_address | Token transfers filtered by address |
blockscout_get_token_info({
contractAddress: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
chainId: 8453,
})
// Returns:
// {
// name: "USD Coin",
// symbol: "USDC",
// decimals: 6,
// totalSupply: "4500000000000000",
// holdersCount: 892341,
// type: "ERC-20"
// }
NFTs
| Tool | Description |
|---|---|
blockscout_get_nft_info | NFT metadata for a specific token ID |
blockscout_get_nft_transfers | Transfer history for an NFT collection |
blockscout_get_nft_holders | Holder distribution for an NFT collection |
blockscout_get_address_nft_collections | NFT collections held by an address |
blockscout_get_nft_info({
contractAddress: "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D",
tokenId: "1234",
chainId: 1,
})
// Returns: { name, description, image, attributes, owner, lastTransfer }
Contract ABIs and Source Code
| Tool | Description |
|---|---|
blockscout_get_contract_abi | ABI for a verified contract |
blockscout_get_contract_source | Source code for a verified contract |
blockscout_get_contract_read_methods | List of read-only functions |
blockscout_get_contract_write_methods | List of state-changing functions |
blockscout_get_contract_abi({
contractAddress: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
chainId: 8453,
})
// Returns the full ABI array for the verified contract
This is particularly useful when you need to interact with a contract but don't have its ABI. Fetch it from Blockscout, then use EVM tools to call functions.
Blocks
| Tool | Description |
|---|---|
blockscout_get_block | Block details by number or hash |
blockscout_get_block_transactions | All transactions in a block |
blockscout_get_latest_block | Current block number and timestamp |
blockscout_get_block({
blockNumber: 19000000,
chainId: 1,
})
// Returns: { number, hash, timestamp, transactionCount, gasUsed, miner }
SDK Functions
import {
getAddressInfo,
getAddressTransactions,
getTransaction,
getTransactionLogs,
getTokenInfo,
getTokenHolders,
getNftInfo,
getContractAbi,
getBlock,
} from "web3agent";
All SDK functions accept a chainId parameter and an optional options object for runtime configuration.
import { getAddressInfo } from "web3agent";
const info = await getAddressInfo({
address: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
chainId: 1,
});
console.log(info.balance); // native balance in wei
console.log(info.transactionCount); // total tx count
console.log(info.tokenHoldings); // ERC-20 holdings
Pagination
Most list endpoints support pagination via page and limit parameters:
blockscout_get_address_transactions({
address: "0x...",
chainId: 8453,
page: 1, // 1-indexed
limit: 50, // max varies by endpoint, typically 50-100
})
The response includes hasNextPage and totalCount where available.
Data Freshness
Blockscout indexes data from the chain with a small delay (typically a few seconds to a minute depending on chain activity). For the absolute latest state (e.g., a balance immediately after a transaction), use EVM tools instead. For historical queries, Blockscout is the right choice.