Skip to main content
Skip to main content

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:

ChainChain ID
Ethereum1
Polygon137
Arbitrum42161
Optimism10
Base8453
Gnosis100
Scroll534352
zkSync Era324

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:

AspectBlockscoutEVM
Data sourceIndexed databaseLive RPC node
Historical dataYes (full history)No (current state only)
Transaction historyYesNo
Token transfersYesNo
NFT metadataYesNo
Contract ABIsYes (verified only)No
Current balanceYesYes
Contract readsNoYes
Contract writesNoYes
SpeedFast (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

ToolDescription
blockscout_get_address_infoAddress overview: balance, transaction count, token holdings
blockscout_get_address_tokensAll ERC-20 tokens held by an address
blockscout_get_address_nftsAll NFTs held by an address
blockscout_get_address_coin_balance_historyHistorical 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

ToolDescription
blockscout_get_address_transactionsPaginated transaction history for an address
blockscout_get_transactionFull details for a specific transaction hash
blockscout_get_transaction_logsEvent logs emitted by a transaction
blockscout_get_transaction_token_transfersToken transfers within a transaction
blockscout_get_internal_transactionsInternal (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

ToolDescription
blockscout_get_token_infoToken metadata: name, symbol, decimals, total supply, holders
blockscout_get_token_holdersPaginated list of token holders with balances
blockscout_get_token_transfersTransfer history for a token contract
blockscout_get_token_transfers_by_addressToken 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

ToolDescription
blockscout_get_nft_infoNFT metadata for a specific token ID
blockscout_get_nft_transfersTransfer history for an NFT collection
blockscout_get_nft_holdersHolder distribution for an NFT collection
blockscout_get_address_nft_collectionsNFT 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

ToolDescription
blockscout_get_contract_abiABI for a verified contract
blockscout_get_contract_sourceSource code for a verified contract
blockscout_get_contract_read_methodsList of read-only functions
blockscout_get_contract_write_methodsList 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

ToolDescription
blockscout_get_blockBlock details by number or hash
blockscout_get_block_transactionsAll transactions in a block
blockscout_get_latest_blockCurrent 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.