$ man contract-source-verified
/contract-source-verified
PRICE / CALL
$0.01
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
edgemarketCATEGORY
uncategorized
STATUS
● live
NAME
contract-source-verified — fetches verified contract source code and abi for a deployed contract on ethereum, optimism, polygon, base, or arbitrum
SYNOPSIS
POST https://x402.agentutility.ai/contract-source-verified
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.DESCRIPTION
Fetches verified contract source code and ABI for a deployed contract on Ethereum, Optimism, Polygon, Base, or Arbitrum. Returns whether the source is verified, the contract name, compiler version, parsed ABI (as a JSON array, not a string), full Solidity source code (multi-file sources reassembled with '// File: ...' separators), license type, optimizer settings, constructor arguments, and, for proxy contracts, the implementation address. Wraps Etherscan v2's multichain getsourcecode endpoint. Use it as an Etherscan source lookup, Basescan ABI fetcher, Solidity source lookup, contract verification check, or ABI fetcher.
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| address | string | 0x-prefixed 20-byte EVM contract address. | required |
| chain | string | EVM chain. Default 'base'. Other supported: 'ethereum', 'polygon', 'arbitrum', 'optimism'. enum: base · ethereum · polygon · arbitrum · optimism | optional |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| address | string | Deployed contract address that was looked up. |
| chain | string | Chain the contract lives on (ethereum, optimism, polygon, base, or arbitrum). |
| is_verified | string | Whether the contract source has been verified on the chain's explorer. |
| name | string | Contract name as declared in the verified Solidity source. |
| compiler_version | string | Solidity compiler version used to build the verified contract (e.g. v0.8.20+commit.a1b79de6). |
| abi | string | Parsed contract ABI as a JSON array of function, event, and error definitions. |
| source_code | string | Full Solidity source code; multi-file contracts are reassembled with '// File: ...' separators. |
| license | string | SPDX license identifier declared in the verified source (e.g. MIT, GPL-3.0, UNLICENSED). |
| optimization | string | Optimizer settings used at compile time, including whether enabled and the runs value. |
| constructor_arguments | string | ABI-encoded constructor arguments passed when the contract was deployed. |
| proxy | string | For proxy contracts, the implementation address the proxy delegates calls to. |
| source | string | Upstream data source for the lookup (Etherscan v2 multichain getsourcecode). |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.agentutility.ai/contract-source-verified \
-H 'Content-Type: application/json' \
-d '{ }'first response =
402 Payment Required with payment requirements; sign + retry with X-PAYMENT.EXAMPLE 2 · mcp
# Install the MCP package for this endpoint's cluster npx -y @agentutility/mcp-<cluster> # Required: EVM private key with USDC on Base export X402_PRIVATE_KEY=0x... # Then call the contract-source-verified tool from your MCP-aware agent.
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
- tags
- edge-marketcontract-verificationetherscanabi-fetchersolidity-sourceproxy-implementationgetsourcecode
- methods
- POST
- cluster
- edgemarket
- price
- $0.01 USDC per call
ADJACENT — other endpoints in edgemarket
| endpoint | description | price |
|---|---|---|
| contract-source | Returns verified source code and ABI for any deployed contract on Ethereum, Base, Optimism, Arbitrum, or Polygon. | $0.01 |
| dex-liquidity-depth | Measures DEX liquidity depth by summing TVL across every DefiLlama-tracked yield pool holding a given ERC-20 on Ethereum, Base, Polygon,… | $0.01 |
| eth-logs | Reads on-chain event logs with generic eth_getLogs queries across Base, Ethereum, Arbitrum, Optimism, Polygon, and BSC via public no-auth… | $0.01 |
| lp-lock-check | Checks whether an LP token's liquidity is locked, useful for detecting rug-pull risk before swapping into a new pair. | $0.01 |
| nft-floor | Gets an NFT collection's floor price and recent sales via Reservoir. | $0.01 |
| agent-card-resolve | Resolves an ERC-8004 agentId to its on-chain owner, agentURI, and agent card JSON. | $0.005 |
| arbitrage-spread | Finds the cross-exchange arbitrage spread for any CoinGecko-listed coin. | $0.005 |
| basename-resolve | Resolves Coinbase Basenames (.base.eth) to Ethereum addresses and back, reading the Base mainnet L2 Resolver on-chain (no gas, no wallet). | $0.005 |
SEE ALSO