chainlens

v0.1.0
io.github.CloudCorpRecords/chainlens Checked 1 day ago Published 1 month ago

Blockscout 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.

ParameterTypeDescription
querystringSubstring 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.

ParameterTypeDescription
name *stringENS name to resolve to an address.

lookup_token_by_symbol

Look up tokens by symbol on a chain via Blockscout search.

ParameterTypeDescription
chain_id *stringChain ID as a string, such as "1" for Ethereum.
symbol *stringToken symbol to search for.

get_contract_abi

Get the ABI of a verified smart contract.

ParameterTypeDescription
address *stringContract address to look up.
chain_id *stringChain 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.

ParameterTypeDescription
address *stringContract address to inspect.
chain_id *stringChain ID as a string, such as "1" for Ethereum.
file_namestringName of a single source file to inspect.

get_address_info

Get information about an address: balance, type, and metadata.

ParameterTypeDescription
address *stringBlockchain address to look up.
chain_id *stringChain ID as a string, such as "1" for Ethereum.

get_tokens_by_address

Get token balances held by an address.

ParameterTypeDescription
address *stringBlockchain address whose token balances to return.
chain_id *stringChain ID as a string, such as "1" for Ethereum.
cursorstringPagination cursor for the next page of results.

get_block_number

Get the latest block number, optionally as of a datetime.

ParameterTypeDescription
chain_id *stringChain ID as a string, such as "1" for Ethereum.
datetimestringDatetime to return the block number as of.

get_transactions_by_address

Get transactions for an address within an age range, optionally filtered by method.

ParameterTypeDescription
address *stringBlockchain address whose transactions to return.
age_from *stringStart of the timestamp range to include, as a date or datetime string.
age_to *stringEnd of the timestamp range to include, as a date or datetime string.
chain_id *stringChain ID as a string, such as "1" for Ethereum.
cursorstringPagination cursor for the next page of results.
methodsstringComma-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.

ParameterTypeDescription
address *stringBlockchain address whose token transfers to return.
age_from *stringStart of the timestamp range to include, as a date or datetime string.
age_to *stringEnd of the timestamp range to include, as a date or datetime string.
chain_id *stringChain ID as a string, such as "1" for Ethereum.
cursorstringPagination cursor for the next page of results.
tokenstringToken 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.

ParameterTypeDescription
address *stringBlockchain address whose NFT tokens to return.
chain_id *stringChain ID as a string, such as "1" for Ethereum.
cursorstringPagination cursor for the next page of results.

get_block_info

Get information about a block by number or hash.

ParameterTypeDescription
chain_id *stringChain ID as a string, such as "1" for Ethereum.
number_or_hash *stringBlock number or block hash to look up.
include_transactionsbooleanWhether to include the block's transactions.

get_transaction_info

Get information about a transaction by hash.

ParameterTypeDescription
chain_id *stringChain ID as a string, such as "1" for Ethereum.
hash *stringTransaction hash to look up.
include_raw_inputbooleanWhether to include the transaction's raw input data.

read_contract

Read a smart contract function using its ABI, function name, and JSON-encoded args.

ParameterTypeDescription
abi *objectContract ABI to use for the call.
address *stringContract address to read from.
chain_id *stringChain ID as a string, such as "1" for Ethereum.
function_name *stringName of the contract function to call.
argsstringFunction arguments as a JSON-encoded string.
blockstringBlock to perform the read at.

direct_api_call

Call an arbitrary Blockscout API v2 endpoint path directly.

ParameterTypeDescription
chain_id *stringChain ID as a string, such as "1" for Ethereum.
endpoint_path *stringBlockscout API v2 endpoint path to call.
cursorstringPagination cursor for the next page of results.
json_bodyobjectJSON request body to send, as an object.
methodstringHTTP method to use, defaulting to GET.
query_paramsobjectQuery parameters to send with the request, as an object.