Guide

Contracts

getContractInfo on Etherscan and Blockscout. The ContractInfo shape. Proxies. What verified actually means, and what it doesn't.

The call

ts
if (provider.capabilities.contractInfo && provider.getContractInfo) {
  const contract = await provider.getContractInfo(address, "ethereum");
}

Etherscan and Blockscout serve it, on every EVM chain they cover. No other provider does, and getContractInfo is absent on them rather than present and useless.

The shape

ts
interface ContractInfo {
  address: string;
  isVerified: boolean; // source available on the explorer
  isProxy?: boolean;
  implementationAddress?: string; // when isProxy
  name?: string;
  compilerVersion?: string;
  abi?: string; // JSON string, as the explorer sends it
  sourceCode?: string;
  isToken?: boolean;
  tokenStandard?: "ERC-20" | "ERC-721" | "ERC-1155";
  creator?: string;
  creationTxHash?: string;
}

isVerified means the explorer holds source that compiles to the deployed bytecode. That's all it means. It says nothing about whether the code is sound, and nothing about the implementation behind a proxy, which is its own address with its own verification. When isProxy is true, read implementationAddress next; the ABI you want is usually there.

abi stays a string so nothing here parses somebody else's JSON on your behalf. JSON.parse it when you need the entries.

CLI

shell
explorers contract 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984
explorers contract 0x… -c base -p blockscout

Agents

Over MCP, explorers_contract answers with the metadata and leaves abi and sourceCode out until the call says abi: true or sourceCode: true. Both run to tens of kilobytes, and a model asking whether a contract is verified doesn't need them in its context.

In the explorer

The Explorer shows the metadata, the number of ABI entries and the length of the source, not the source itself. A verified contract's source can run to hundreds of kilobytes and a demo page isn't where you read it.