# skills.onesource.io Blockchain Contract Bytecode Fetcher

> skills.onesource.io Blockchain Contract Bytecode Fetcher is a paid API for AI agents from skills.onesource.io, paid per call via x402, $0.003000/call, status unknown (last checked 2026-09-14).

Returns the on-chain bytecode (EVM code) deployed at a given smart contract address on a specified blockchain network.

## Facts

- Endpoint: GET https://skills.onesource.io/api/chain/code/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
- Price: $0.003000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/skills-onesource-io-5fd9cf90
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bnuThBAIzH7MbNXk64H41

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-5fd9cf90
```

Example prompt: Can you fetch the deployed bytecode for the contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on the Ethereum mainnet?

## When to prefer this

Use this endpoint when you need the raw EVM bytecode of a deployed contract — for example, to decompile it, detect proxy patterns, verify deployment, or analyze its structure. Prefer this over higher-level contract ABI or metadata endpoints when you need the actual on-chain code bytes rather than human-readable interface definitions.

## Known failure modes

- Invalid address format (not matching 0x + 40 hex chars) returns a validation error
- Address is an EOA with no deployed code — returns empty bytecode '0x'
- Unsupported or misspelled network name returns an error
- Network RPC node unavailable or rate-limited causes a timeout or 503
- Contract was self-destructed and no longer has code at that address

## How this service works

Returns code details for a given blockchain address on-chain.

## Output

A hex-encoded string of the raw EVM bytecode currently deployed at the given contract address on the specified network. If the address is an EOA (externally owned account) with no code, the response will be empty or '0x'. The output can be used for further analysis, decompilation, or proxy pattern detection.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "address": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$"
  },
  "network": {
   "enum": [
    "ethereum",
    "sepolia",
    "avax",
    "megaeth",
    "megaeth-testnet",
    "base"
   ],
   "type": "string",
   "default": "ethereum"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "data",
  "meta"
 ],
 "properties": {
  "data": {
   "type": "object",
   "required": [
    "code",
    "address",
    "code_length",
    "is_contract"
   ],
   "properties": {
    "code": {
     "type": "string"
    },
    "address": {
     "type": "string"
    },
    "code_length": {
     "type": "number"
    },
    "is_contract": {
     "type": "boolean"
    }
   }
  },
  "meta": {
   "type": "object",
   "required": [
    "endpoint",
    "request_id"
   ],
   "properties": {
    "endpoint": {
     "type": "string"
    },
    "request_id": {
     "type": "string"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/skills-onesource-io-5fd9cf90/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)
