# OneSource eth_getCode Contract Checker

> OneSource eth_getCode Contract Checker is a paid API for AI agents from skills.onesource.io, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-15).

Checks whether an Ethereum address is a smart contract by retrieving its deployed bytecode via eth_getCode on multiple EVM networks

## Facts

- Endpoint: GET https://skills.onesource.io/api/chain/code/:address
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/skills-onesource-io-743fdbe0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VdfS57Rgm23Z97It00Hxq

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability skills-onesource-io-743fdbe0
```

Example prompt: Is 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 a smart contract or a regular wallet on Ethereum mainnet — can you check its on-chain bytecode?

## When to prefer this

Use this endpoint when you need to programmatically determine whether an Ethereum-compatible address hosts a smart contract, or when you need the raw deployed bytecode for a contract across Ethereum mainnet, Base, Avalanche, Sepolia, or MegaETH. Prefer it over general block-explorer lookups when you need machine-readable bytecode in an agent workflow without scraping a UI.

## Known failure modes

- Invalid address format (not matching 0x + 40 hex chars) — 400 validation error
- Unsupported network value — 400 enum validation error
- Address not found or network RPC unavailable — 502 or timeout
- Payment not provided or insufficient — 402 payment required

## How this service works

Check if an Ethereum address is a contract via eth_getCode - returns deployed bytecode

## Output

Returns the deployed bytecode at the given address on the specified EVM network. If bytecode is non-empty (not '0x'), the address is a smart contract; if it returns '0x', it is an externally owned account (EOA) with no code.

## Example request

```json
{
 "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
 "network": "ethereum"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/skills-onesource-io-743fdbe0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from skills.onesource.io](https://www.zero.xyz/host/skills.onesource.io/llms.txt)
