Inspect a Base smart-contract address before interacting with it
Inspect a Base smart-contract address before interacting with it. Returns deterministic bytecode hash/size, EIP-1967 implementation information, ERC-20 metadata when available, and the current chain head. Read-only and does not make safety or legitimacy claims.
5000 (raw units)
price
1
calls / 30d
1
unique payers
2026-08-30
updated
Provider
agent-api-testnet.tim1712.workers.dev · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:84532",
"payTo": "0x5229384BD502D85aa7EcA0A31B515E5E48d3910F",
"asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"amount": "5000",
"maxTimeoutSeconds": 300
}
]Output schema
{
"bazaar": {
"info": {
"input": {
"body": {
"address": "0x036CbD53842c5426634e7929541eC2318f3dCF7e"
},
"bodyType": "json",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"address": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"chain": {
"blockNumber": 25000000,
"headAgeSeconds": 2,
"headTimestamp": "2026-08-30T10:00:00.000Z"
},
"chainId": 84532,
"checkedAt": "2026-08-30T10:00:02.000Z",
"codeHash": "0x8e8f23e7f585953f9438e890f6f2c7f4287fef3a543aa48a8f6f547e840f5a87",
"codeSizeBytes": 492,
"isContract": true,
"network": "base-sepolia",
"proxy": {
"detected": true,
"implementation": "0xd74cc5d436923b8ba2c179b4bCA2841D8A52C5B5",
"type": "eip1967"
},
"token": {
"decimals": 6,
"erc20Like": true,
"name": "USDC",
"symbol": "USDC",
"totalSupply": "1000000000000"
}
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"additionalProperties": false,
"properties": {
"address": {
"pattern": "^0x[0-9a-fA-F]{40}$",
"type": "string"
}
},
"required": [
"address"
],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"additionalProperties": false,
"properties": {
"address": {
"pattern": "^0x[0-9a-fA-F]{40}$",
"type": "string"
},
"chain": {
"additionalProperties": false,
"properties": {
"blockNumber": {
"minimum": 0,
"type": "integer"
},
"headAgeSeconds": {
"minimum": 0,
"type": "integer"
},
"headTimestamp": {
"type": "string"
}
},
"required": [
"blockNumber",
"headTimestamp",
"headAgeSeconds"
],
"type": "object"
},
"chainId": {
"const": 84532,
"type": "number"
},
"checkedAt": {
"type": "string"
},
"codeHash": {
"anyOf": [
{
"pattern": "^0x[0-9a-fA-F]{64}$",
"type": "string"
},
{
"type": "null"
}
]
},
"codeSizeBytes": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
]
},
"isContract": {
"type": "boolean"
},
"network": {
"const": "base-sepolia",
"type": "string"
},
"proxy": {
"additionalProperties": false,
"properties": {
"detected": {
"type": "boolean"
},
"implementation": {
"anyOf": [
{
"pattern": "^0x[0-9a-fA-F]{40}$",
"type": "string"
},
{
"type": "null"
}
]
},
"type": {
"anyOf": [
{
"const": "eip1967",
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"detected",
"type",
"implementation"
],
"type": "object"
},
"token": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"decimals": {
"anyOf": [
{
"maximum": 255,
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
]
},
"erc20Like": {
"type": "boolean"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"symbol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"totalSupply": {
"anyOf": [
{
"pattern": "^\\d+$",
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"erc20Like",
"name",
"symbol",
"decimals",
"totalSupply"
],
"type": "object"
},
{
"type": "null"
}
]
}
},
"required": [
"network",
"chainId",
"address",
"isContract",
"codeSizeBytes",
"codeHash",
"proxy",
"token",
"chain",
"checkedAt"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
}
}Use it
curl
curl "https://agent-api-testnet.tim1712.workers.dev/v1/evm/contract-preflight" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://agent-api-testnet.tim1712.workers.dev/v1/evm/contract-preflight");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}Python
import httpx
res = httpx.get("https://agent-api-testnet.tim1712.workers.dev/v1/evm/contract-preflight")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/8367.json, and this resource appears in /discovery/resources and /discovery/search.