Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Hook Manifests

A hook manifest is a JSON document that describes a deployed hook: who wrote it, where it is deployed, what callbacks it implements, who controls it and what evidence backs its claims. The hook registry lists hooks by manifest.

  • Schema: https://taskmarket.dev/schemas/taskmarket-hook/1.0.0/schema.json (JSON Schema 2020-12). The canonical source is packages/contracts/schemas/taskmarket-hook.schema.json; the hosted copy is kept byte-identical by make hook-manifest-schema-drift.
  • Validation is structural. A valid manifest proves its shape, not that its claims are true.
  • Per-deployment evidence (addresses, code hashes, proxy authority, gas, verifier records, dependency and role bindings) is scoped to the chain it is declared for, never treated as a global claim.

Field reference

Every top-level field is required.

FieldWhat it declares
manifestVersionSchema version, 1.0.0.
identityname, slug, semver version and description.
authorPublisher name and HTTPS url.
sourceSource repository, the git commit and the contract path.
licenseSPDX license identifier.
deploymentsOne entry per chain: chainId, network, hook address, taskmarketDiamond, the deployment transactionHash and blockNumber, runtimeCodehash, proxy metadata (kind, upgradeability, implementation, admin, a description of the upgrade authority) and gas.estimates per callback (typical, maximum and methodology).
callbacksWhich of the ten ITMPHook callbacks the hook implements, and what each does.
taskModesThe task modes the hook supports.
hookDataThe wire format the hook expects in hookData (encoding, ABI parameters, an encoded example and a decoded example). Publisher-attested: validation does not prove the encoded bytes match the ABI.
sourceVerificationSource-verifier records, each keyed by a declared chainId, with HTTPS verifier URLs.
privilegedRolesRoles (owner, upgrader, pauser and so on) with every holder bound to a declared deployment chain.
externalDependenciesContracts and services the hook calls, with addresses and URLs grouped per declared chain.
livenessRequirements for the hook to keep working, its failure mode and the recovery procedure.
securityNotes and audit status (unaudited, in-progress or audited), scope and report URL.
listingThe publisher's listing status and evidence URL. A publisher assertion only.
conformanceClaimed interface and test conformance, with evidence. Not an audit.
protocolDefaultWhether the hook is a protocol default on a chain, with evidence. Independent of listing, conformance and audit.

For a complete real example, read any file under hook-registry/manifests/, such as the TaskTokenRewardHook entry for Base Sepolia.

Gas figures should come from a reproducible measurement, such as forge test --gas-report at the manifest's source.commit, and say so in methodology. Keep every maximum below the 1,000,000 gas stipend.

Building a manifest at /hooks/build

The hook builder at taskmarket.dev/hooks/build walks through every field for a chosen chain, shows that chain's protocol-default hooks and hook limit, and produces two files you can copy or download:

  • taskmarket-hook.json: the manifest.
  • MyTaskmarketHook.sol: a Solidity scaffold for the callbacks you selected.

The builder lists every field still missing.

Drafts

Until every evidence field is complete, the builder emits the manifest with an x-draft object containing a warning and the list of missing fields. x-draft marks a schema-shaped file that is never publishable: validators treat any manifest with x-draft set to true or an object as a draft, and the registry rejects it. Remove x-draft only when the manifest is complete and you have independently checked every declaration.

Validating locally

From a checkout of this repository:

make contract hook-manifest