{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://mcp-docs.feelyourprotocol.org/schemas/run_bytecode.input.json",
  "title": "run_bytecode input",
  "type": "object",
  "required": ["bytecode"],
  "properties": {
    "bytecode": {
      "type": "string",
      "description": "Hex-encoded EVM bytecode (0x prefix optional). Max 24576 bytes."
    },
    "accounts": {
      "type": "array",
      "description": "BYOS prestate in the same call: balances (wei strings), runtime code, storage, nonce. Empty world otherwise.",
      "items": {
        "type": "object",
        "required": ["address"],
        "additionalProperties": false,
        "properties": {
          "address": { "type": "string", "description": "Hex address." },
          "balance": {
            "type": "string",
            "description": "Wei as decimal string. Omit for default 1 ETH; use \"0\" for unfunded."
          },
          "nonce": {
            "type": "string",
            "description": "Account nonce as decimal string. Default 0."
          },
          "code": { "type": "string", "description": "Runtime bytecode already at this address." },
          "storage": {
            "type": "array",
            "description": "Optional storage slots to seed (existing-slot SSTORE / SLOAD).",
            "items": {
              "type": "object",
              "required": ["slot", "value"],
              "properties": {
                "slot": { "type": "string", "description": "Storage slot hex (≤32 bytes)." },
                "value": { "type": "string", "description": "Storage value hex (≤32 bytes)." }
              },
              "additionalProperties": false
            }
          }
        }
      }
    },
    "fork": {
      "type": "object",
      "properties": {
        "baseHardfork": { "type": "string" },
        "eips": {
          "type": "array",
          "items": { "type": "integer" }
        }
      },
      "required": ["baseHardfork"]
    },
    "gasLimit": {
      "type": "string",
      "description": "Execution gas limit as decimal string. Default 1000000. Max 30000000."
    },
    "trace": {
      "type": "boolean",
      "description": "Include stack-only opcode trace when true (max 10000 steps)."
    }
  },
  "additionalProperties": false
}
