{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/cdump/evmole/blob/master/agent/schemas/request-v2.schema.json",
  "title": "EVMole agent analysis request v2",
  "type": "object",
  "additionalProperties": false,
  "required": ["bytecode"],
  "properties": {
    "bytecode": {
      "type": "string",
      "description": "Deployed EVM runtime bytecode as hexadecimal, optionally prefixed by 0x.",
      "oneOf": [
        {
          "minLength": 4,
          "maxLength": 2097154,
          "pattern": "^0[xX](?:[0-9a-fA-F]{2})+$"
        },
        {
          "minLength": 2,
          "maxLength": 2097152,
          "pattern": "^(?:[0-9a-fA-F]{2})+$"
        }
      ]
    },
    "include": {
      "type": "array",
      "description": "Analysis features to include. Arguments and stateMutability imply selectors; all three are returned as records in analysis.functions.",
      "uniqueItems": true,
      "items": {
        "enum": [
          "selectors",
          "arguments",
          "stateMutability",
          "storage",
          "transientStorage",
          "metadata",
          "proxy",
          "disassembly",
          "basicBlocks",
          "controlFlowGraph"
        ]
      }
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991,
      "default": 0
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5000,
      "default": 1000
    }
  }
}
