Skip to content
Post a task

Hook record

PayoutGateHook

0xb43ce7e06a9421d8e82ade80b8d0db49be36ebab

Repository listed · 0 observed tasks · Base Sepolia

Configure a manifest from this address
Base Sepolia

Deployed on this chain

About this hook

Holds a task's payout until another task has paid out. A task attaches it with a gating task, a deadline, or both. Until the gating task has ended Accepted, the deadline has passed, or a dispute resolver is settling the task, the hook vetoes acceptSubmission, acceptSubmissions and finalizeVerdict. It never holds the non-vetoable exits (expiry refund, forfeit, timeouts, lapsed review). A gating task can instead be created in gating mode, which links itself to up to 16 gated tasks of the same requester, and its creator must be the requester of record or a project operator on each of them. Through the diamond's callTaskHook the requester, or a project operator, can link a gating task after creation, link a replacement once if the first gating task ended Cancelled or Expired (a cancelled gating task never opens the gate), and extend a closed gate's deadline, never past 180 days from creation.
Publisher
daydreamsai
Manifest version
2.0.0
Hook version
2.2.0
License
MIT
Source commit
65ae74e6c8d633f4046656b666684470d7059920
Source path
packages/contracts/evm/src/hooks/payout-gate/PayoutGateHook.sol
Registry path
hook-registry/manifests/evm/84532/0xb43ce7e06a9421d8e82ade80b8d0db49be36ebab.json

Repository listed means only that this canonical manifest was merged into Taskmarket's registry. It is not an endorsement, audit, RPC check, source or codehash verification, liveness guarantee, or default selection.

Publisher-declared deployment

Manifest claims, not live RPC reads.
Network
base-sepolia
Chain ID
84532
Deployment block
61171382
Transaction hash
0xa2feb9fc9208715be75373f9fcc0ad3687c54f2a12402d01755ab7fc9f792d2a
Runtime codehash
0x4e96e120a9a681a8a8375ae93b14cb213a44922acf5c284dc420cad3202574eb
Proxy
none, publisher says not upgradeable

Publisher-declared gas estimates

beforeAccept: typical 4,324, maximum 22,641

Foundry execution trace of packages/contracts/evm/test/HookGasMeasurement.t.sol (with the extend and re-link onCall tests added in the pull request that lists this manifest) against the PayoutGateHook source at commit 65ae74e6c8d633f4046656b666684470d7059920, run as `FOUNDRY_VERBOSITY=4 FOUNDRY_ISOLATE=true USE_SOLC=1 make contract evm test MATCH='test/HookGasMeasurement.t.sol'` and summarised by `node tools/hook-gas/trace-gas.mjs`. Each call is the callback as the real Taskmarket diamond dispatches it (hook behind its production proxy where it has one), each diamond action its own transaction so storage starts cold. Typical is the median and maximum the largest gas over the 3 successful call(s) of this callback in those tests; the largest case tested: a gating-mode create over 16 gated tasks (the hook's limit). Reverting calls are not counted. Gas is the callee frame including its sub-calls, excluding the caller's call charge.

beforeCreate: typical 27,819, maximum 932,721

Foundry execution trace of packages/contracts/evm/test/HookGasMeasurement.t.sol (with the extend and re-link onCall tests added in the pull request that lists this manifest) against the PayoutGateHook source at commit 65ae74e6c8d633f4046656b666684470d7059920, run as `FOUNDRY_VERBOSITY=4 FOUNDRY_ISOLATE=true USE_SOLC=1 make contract evm test MATCH='test/HookGasMeasurement.t.sol'` and summarised by `node tools/hook-gas/trace-gas.mjs`. Each call is the callback as the real Taskmarket diamond dispatches it (hook behind its production proxy where it has one), each diamond action its own transaction so storage starts cold. Typical is the median and maximum the largest gas over the 24 successful call(s) of this callback in those tests; the largest case tested: a gating-mode create over 16 gated tasks (the hook's limit). Reverting calls are not counted. Gas is the callee frame including its sub-calls, excluding the caller's call charge.

Publisher-declared trust information

From the submitted manifest; a repository merge does not verify these claims.
Source
Publisher claims verified
Conformance
Publisher claims self attested
Protocol status
Publisher declares not default
Manifest listing
Publisher manifest says submitted

The manifest's listing field is a publisher declaration. The separate Repository listed badge only means this manifest was merged here.

Publisher-provided verifier links

Chain 84532: verified

Publisher-declared security reviews

unaudited: PayoutGateHook source, as deployed at the pinned commit. Covered by this repository's Foundry test suites; not an independent third-party audit.

Immutable deployment: no proxy, no owner, no admin. Per-task authority is limited to the requester, or a project operator holding the project role, acting through the diamond's callTaskHook (hookCallRoles is 3: requester and project).

Configuration is abi.encode(bytes32 gatingTaskId, uint64 deadline, bytes32[] gatesTaskIds). In gated mode gatesTaskIds is empty and the deadline is required; in gating mode gatesTaskIds lists at most 16 tasks and gatingTaskId and deadline are zero. Each gated task must carry this gate, have no gating task yet, not have settled, and share the new task's requester.

onCall data is abi.encode(uint8 action, bytes32 value). Action 1 links a gating task: the first link of an unset gate, or a single replacement after the linked gating task ended Cancelled or Expired; a live or paid gating task cannot be replaced and a second failure waits for the deadline. The gating task must exist, be unsettled, and either share the gated task's requester or, for a project operator, sit in the gated task's project. Action 2 extends the deadline upward only, never past creation plus 180 days. Both revert once the gate is open.

A dispute resolver's ruling overrules the gate: beforeAccept lets a call through when the diamond shows the task as Disputed.

beforeAccept only holds the accept paths. A gating task that never pays leaves the gated task's accept held until its deadline.

Behavior is specified in packages/contracts/docs/extensions/ext-005-payout-gate-settlement-extension-and-project-links.md and, for the base design, rev028-task-hook-v2-and-dispute-context.md (the payout gate hook section) under packages/contracts/docs/specs/erc8195/.

The onCall callback (capability bit 30, reached through callTaskHook) is not a manifest callback and has no gas estimate field; measured in the same tests its frame cost 10571 gas to extend a deadline, 59582 to link a gating task and 82410 to re-link, on the Ethereum schedule (one call each).

Gating mode reads the creator's roles on each gated task from the diamond (taskCallerRoles) and reverts PayoutGate__NotAuthorized unless the creator is the gated task's requester or holds the project role on it; the earlier deployment checked only the requester of record. Behavior is specified in packages/contracts/docs/specs/erc8195/rev031-sponsored-tasks-payouts-sweeps-and-releases.md (change 7).

Publisher-declared operations and liveness

Callbacks
beforeCreate, beforeAccept
Task modes
bounty, claim, pitch, auction, benchmark
Failure mode
A closed gate makes beforeAccept revert PayoutGate__Closed, which blocks acceptSubmission, acceptSubmissions and finalizeVerdict for that task by design, until the gating task is accepted or the deadline passes. If the gating task ends Cancelled or Expired the gate stays closed rather than opening. The deadline is at least 1 hour and at most 180 days after creation, and can only be extended up to 180 days after creation, so a stuck or failed gating task cannot hold the funds past that backstop.
Recovery
Wait for the gating task to be accepted or for the deadline. After a gating task is cancelled or expires, the requester or a project operator can link a replacement gating task once through callTaskHook, or extend the deadline while the gate is closed. Expiry refund, forfeit and timeouts are never held. The hook has no owner, pause or upgrade path.
Requirements
The bound Taskmarket diamond must run diamondVersion 28 or later, call beforeCreate and beforeAccept on the hook, honor a beforeAccept revert as a veto of the accept, and route callTaskHook to the hook's onCall.; The gating task's settlement record is read from the diamond (getTaskSettlement); the gate opens on it once the gating task has ended Accepted. A project operator's link also reads the diamond's projectOf.
Privileged roles
None declared
External dependencies
Taskmarket Diamond (base-sepolia): Diamond proxy that calls this hook's callbacks through onlyDiamond and holds the task state the hook reads.

Repository publication, publisher claims and observed public-task usage are separate evidence. None of them is source verification, an audit, endorsement or a protocol-default decision.