# NIGHTSHIFT Uniswap v4 Hook Inspector

> NIGHTSHIFT Uniswap v4 Hook Inspector is a paid API for AI agents from getnightshift.tech, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-31).

Analyzes a Uniswap v4 hook contract at a given Ethereum address and returns its permission bits, implemented callbacks, fee logic, owner/admin functions, upgradeability, and known template matches.

## Facts

- Endpoint: GET https://getnightshift.tech/api/v1/hook/:address?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nightshift-uniswap-v4-hook-inspector-2318320a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Wwk_oK7OZEOGjBoqbFoaA

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 nightshift-uniswap-v4-hook-inspector-2318320a
```

Example prompt: Before I add liquidity through this Uniswap v4 hook at 0x1234...abcd, can you analyze it and tell me what callbacks it implements, whether it's upgradeable, who the owner is, and what risk level it carries?

## When to prefer this

Use this endpoint when an AI agent needs to evaluate a specific Uniswap v4 hook contract before executing a trade or liquidity provision — particularly when you need decoded permission bits, callback inventory, fee and ownership details, upgradeability risk, and template identification in a single call. Prefer this over generic contract explorers when you need DeFi-specific hook semantics and structured risk assessment rather than raw bytecode or ABI data.

## Known failure modes

- Invalid or malformed Ethereum address returns an error
- Hook contract not deployed at address returns empty or error response
- Unverified contract with no available source code falls back to bytecode analysis only
- Payment not included or insufficient USDC results in 402 response
- explain=1 adds $0.50 to cost; forgetting this flag returns no explanations

## How this service works

Use when an agent needs to know what a Uniswap v4 hook on Ethereum can do before trading or providing liquidity through it: permission bits from the address, which callbacks it implements, fee logic and recipients, owner and admin functions with their caps, upgradeability and known templates (IMD launch hooks, NightshiftHook), from verified source or bytecode. Run by NIGHTSHIFT.

## Output

Returns a JSON object containing: a human-readable summary, a risk level (low/medium/high), permission flags decoded from the hook address, list of implemented callbacks, fee structure and recipients, owner and admin function details with their caps, upgradeability status, template match (e.g. NightshiftHook, IMD launch hook), and evidence array. Optionally includes per-permission written explanations and source excerpts when explain=1 is passed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "explain": {
       "enum": [
        "0",
        "1"
       ],
       "type": "string",
       "description": "1: add the written explanation and the source lines behind every power ($0.50)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "summary",
      "risk",
      "flags",
      "callbacks",
      "powers",
      "evidence"
     ],
     "properties": {
      "fees": {
       "type": "object"
      },
      "risk": {
       "enum": [
        "low",
        "medium",
        "high"
       ],
       "type": "string"
      },
      "flags": {
       "type": "object",
       "properties": {
        "hex": {
         "type": "string"
        },
        "valid": {
         "type": "boolean"
        },
        "permissions": {
         "type": "array"
        }
       }
      },
      "owner": {
       "type": "object"
      },
      "pools": {
       "type": "array"
      },
      "powers": {
       "type": "array"
      },
      "source": {
       "type": "object"
      },
      "summary": {
       "type": "string"
      },
      "evidence": {
       "type": "array"
      },
      "template": {
       "type": [
        "object",
        "null"
       ]
      },
      "callbacks": {
       "type": "array"
      },
      "explanation": {
       "type": "object",
       "description": "explain=1 only: text and source excerpts"
      },
      "upgradeable": {
       "type": "object"
      },
      "adminFunctions": {
       "type": "array"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nightshift-uniswap-v4-hook-inspector-2318320a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from getnightshift.tech](https://www.zero.xyz/host/getnightshift.tech/llms.txt)
