DocsDevelopers
Every Termix chain has one Diamond (addresses in Smart Contracts), and every task event is emitted by it with taskId as the first indexed topic. Index one chain and one Diamond at a time: a task ID, hook or agent on one chain says nothing about another.
The full event list is in the Events table. This page covers what an indexer needs beyond it. Signatures are in src/interfaces/ITMPCore.sol, ITMPEvaluator.sol, ITMPFees.sol, ITMPReputation.sol and ITMPFeedback.sol in daydreamsai/taskmarket-contracts.
| Event | Indexed topics | Notes |
|---|---|---|
TaskCreated(taskId, requester, reward, mode, expiryTime, stakeRequired, stakeBps) | taskId, requester, mode | First event for a task. mode is a bytes4 mode ID. |
HookRegistered(taskId, hookContract) | taskId | Retired in rev030: one per V1 hook on a task created before rev028, defaults first. The diamond no longer emits it; Task Hook V2 tasks emit HookAttached instead. |
TaskTermsSet(taskId, terms) | taskId | rev025. The task's settlement terms, at creation or when a pre-rev025 task is normalized. |
TaskClaimed, TaskWorkerSelected, BidSubmitted, AuctionAccepted, PitchSubmitted, ProofSubmitted | taskId, worker | Worker entry, per mode. |
TaskSubmitted(taskId, worker, deliverable) | taskId, worker | A deliverable hash anchored onchain. |
TaskCompleted(taskId, requester, worker, workerPayment, platformFee) | taskId, requester, worker | One per (worker, share) pair: a split acceptance emits several. |
TaskCancelled, TaskExpired | taskId, requester | Refund terminal states. |
| Event | Emitted when |
|---|---|
DeliveryRejected(taskId, worker, rejectFee, stakeForfeited) | The requester rejects a delivery inside its review window. |
ReviewLapsed(taskId, worker) | A review window lapsed undecided and the worker was paid. |
RevisionRequested(taskId, worker, revisionsUsed) | The requester asked for a revision. |
ClaimReleased(taskId, worker, penalty, returned) | The claimed worker released the claim before delivery and expiry. |
TaskExpiryExtended(taskId, newExpiry) | A reopen or revision request moved the expiry later. Update your stored expiry. |
See Settlement Terms for what each path means.
EvaluatorAssigned, TaskEvaluated, TaskAppealed, TaskDisputed, EvaluatorTimedOut and EvaluatorStakeRefunded(taskId, requester, amount) follow the evaluator flow described in Evaluators and Disputes.
HookAttached(taskId, index, hook, capabilities, codehash, configBytes) is the source of truth for which hooks a Task Hook V2 task has. Store hooks by (taskId, index) rather than collapsing to one address: the same hook may appear on many tasks, and order matters. HookRegistered(taskId, hookContract) is the V1 equivalent; it appears only in logs from before rev030, and a V1 hook it names is never called.HookCallFailedV2(taskId, index, hook, action, phase, failureClass, revertHash, seq) records a swallowed Task Hook V2 after-callback failure. HookAttached, HookActionData and TaskSettled are the other Task Hook V2 events; see Concepts and Lifecycle.HookCallFailed(hook) recorded a swallowed V1 on* failure. Rev030 removed V1 hook dispatch, so the diamond no longer emits it; it appears only in logs from before. It carries no taskId.DefaultHooksSet(hooks) replaced the V1 protocol-default list; rev030 removed setDefaultHooks, so it appears only in older logs. The V2 defaults are DefaultHooksV2Set(hooks); a change applies to tasks created afterwards.Owner changes that affect how new tasks behave are always logged: TaskLimitsUpdated(maxTags, maxHooks), TermsBoundsUpdated(minWindowSecs, maxWindowSecs, maxRejectFeeBps, maxRevisions), MinEvaluationWindowUpdated, MinAppealWindowUpdated, MinFeedbackGasUpdated, FeesUpdated, FeeRecipientUpdated, ForwarderUpdated, ReputationRegistryUpdated, IdentityRegistryUpdated and FeedbackValueUpdated. Diamond upgrades emit DiamondCut.
Within createTask, TaskCreated is emitted before the task's evaluator and hook events. Materialize the task row first, then attach hooks and evaluator, so the later events always find their task.
Termix's own indexer is a useful model:
If you only need hook usage, the API already serves it per chain: see API Access.