chainlens
v0.1.0Blockscout explorer data: addresses, blocks, transactions, tokens, NFTs, and contract reads.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
__unlock_blockchain_analysis__
Unlock blockchain analysis: local guidance and the list of supported chains. No network call.
get_chains_list
List the supported chains, optionally filtered by a substring of name, chain id, or currency.
| Parameter | Type | Description |
|---|---|---|
query | string | Substring filter matched against chain name, chain ID, or currency. |
get_address_by_ens_name
Resolve an ENS name to an address via Blockscout search on Ethereum mainnet.
| Parameter | Type | Description |
|---|---|---|
name * | string | ENS name to resolve to an address. |
lookup_token_by_symbol
Look up tokens by symbol on a chain via Blockscout search.
| Parameter | Type | Description |
|---|---|---|
chain_id * | string | Chain ID as a string, such as "1" for Ethereum. |
symbol * | string | Token symbol to search for. |
get_contract_abi
Get the ABI of a verified smart contract.
| Parameter | Type | Description |
|---|---|---|
address * | string | Contract address to look up. |
chain_id * | string | Chain ID as a string, such as "1" for Ethereum. |
inspect_contract_code
Inspect the source code of a verified smart contract, optionally for one file.
| Parameter | Type | Description |
|---|---|---|
address * | string | Contract address to inspect. |
chain_id * | string | Chain ID as a string, such as "1" for Ethereum. |
file_name | string | Name of a single source file to inspect. |
get_address_info
Get information about an address: balance, type, and metadata.
| Parameter | Type | Description |
|---|---|---|
address * | string | Blockchain address to look up. |
chain_id * | string | Chain ID as a string, such as "1" for Ethereum. |
get_tokens_by_address
Get token balances held by an address.
| Parameter | Type | Description |
|---|---|---|
address * | string | Blockchain address whose token balances to return. |
chain_id * | string | Chain ID as a string, such as "1" for Ethereum. |
cursor | string | Pagination cursor for the next page of results. |
get_block_number
Get the latest block number, optionally as of a datetime.
| Parameter | Type | Description |
|---|---|---|
chain_id * | string | Chain ID as a string, such as "1" for Ethereum. |
datetime | string | Datetime to return the block number as of. |
get_transactions_by_address
Get transactions for an address within an age range, optionally filtered by method.
| Parameter | Type | Description |
|---|---|---|
address * | string | Blockchain address whose transactions to return. |
age_from * | string | Start of the timestamp range to include, as a date or datetime string. |
age_to * | string | End of the timestamp range to include, as a date or datetime string. |
chain_id * | string | Chain ID as a string, such as "1" for Ethereum. |
cursor | string | Pagination cursor for the next page of results. |
methods | string | Comma-separated list of transaction method names to filter by. |
get_token_transfers_by_address
Get token transfers for an address within an age range, optionally for one token.
| Parameter | Type | Description |
|---|---|---|
address * | string | Blockchain address whose token transfers to return. |
age_from * | string | Start of the timestamp range to include, as a date or datetime string. |
age_to * | string | End of the timestamp range to include, as a date or datetime string. |
chain_id * | string | Chain ID as a string, such as "1" for Ethereum. |
cursor | string | Pagination cursor for the next page of results. |
token | string | Token to filter by, matched against its address, symbol, or name. |
nft_tokens_by_address
Get NFT tokens (ERC-721 and ERC-1155) held by an address.
| Parameter | Type | Description |
|---|---|---|
address * | string | Blockchain address whose NFT tokens to return. |
chain_id * | string | Chain ID as a string, such as "1" for Ethereum. |
cursor | string | Pagination cursor for the next page of results. |
get_block_info
Get information about a block by number or hash.
| Parameter | Type | Description |
|---|---|---|
chain_id * | string | Chain ID as a string, such as "1" for Ethereum. |
number_or_hash * | string | Block number or block hash to look up. |
include_transactions | boolean | Whether to include the block's transactions. |
get_transaction_info
Get information about a transaction by hash.
| Parameter | Type | Description |
|---|---|---|
chain_id * | string | Chain ID as a string, such as "1" for Ethereum. |
hash * | string | Transaction hash to look up. |
include_raw_input | boolean | Whether to include the transaction's raw input data. |
read_contract
Read a smart contract function using its ABI, function name, and JSON-encoded args.
| Parameter | Type | Description |
|---|---|---|
abi * | object | Contract ABI to use for the call. |
address * | string | Contract address to read from. |
chain_id * | string | Chain ID as a string, such as "1" for Ethereum. |
function_name * | string | Name of the contract function to call. |
args | string | Function arguments as a JSON-encoded string. |
block | string | Block to perform the read at. |
direct_api_call
Call an arbitrary Blockscout API v2 endpoint path directly.
| Parameter | Type | Description |
|---|---|---|
chain_id * | string | Chain ID as a string, such as "1" for Ethereum. |
endpoint_path * | string | Blockscout API v2 endpoint path to call. |
cursor | string | Pagination cursor for the next page of results. |
json_body | object | JSON request body to send, as an object. |
method | string | HTTP method to use, defaulting to GET. |
query_params | object | Query parameters to send with the request, as an object. |