{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://mcp-docs.feelyourprotocol.org/schemas/generate_artifact.input.json",
  "title": "generate_artifact input",
  "description": "Same lab block inputs as run_block, plus optional artifact kind (EIP-7928 BAL first).",
  "type": "object",
  "required": ["transactions"],
  "properties": {
    "kind": {
      "type": "string",
      "enum": ["block-access-list"],
      "description": "Artifact to derive from the lab block. Default block-access-list (EIP-7928)."
    },
    "transactions": {
      "type": "array",
      "minItems": 1,
      "maxItems": 8,
      "description": "1–8 impersonated transactions to execute as one lab block.",
      "items": {
        "type": "object",
        "required": ["from", "to"],
        "properties": {
          "from": { "type": "string", "description": "Hex sender address (impersonated)." },
          "to": { "type": "string", "description": "Hex recipient address." },
          "value": { "type": "string", "description": "Value in wei (decimal string). Default 0." },
          "data": { "type": "string", "description": "Optional calldata hex." },
          "code": {
            "type": "string",
            "description": "Optional runtime bytecode installed at to before the block."
          },
          "gasLimit": {
            "type": "string",
            "description": "Transaction gas limit as decimal string. Default 1000000. Max 30000000."
          }
        },
        "additionalProperties": false
      }
    },
    "header": {
      "type": "object",
      "properties": {
        "slotNumber": {
          "type": "string",
          "description": "Beacon slot as a decimal string. Glamsterdam / EIP-7843 only."
        },
        "number": { "type": "string", "description": "Block number as a decimal string. Default 1." },
        "timestamp": { "type": "string", "description": "Unix timestamp as a decimal string. Default 1." }
      },
      "additionalProperties": false
    },
    "accounts": {
      "type": "array",
      "description": "BYOS prestate: fund tx senders and on-chain contracts (wei, code, storage, nonce) in the same call.",
      "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"]
    }
  },
  "additionalProperties": false
}
