Hook record
PayoutGateHook
0xbb3c27dc89d8d067dd2a499dfc6b7b8800f729e3
Repository listed · 3 observed tasks · Tempo Moderato
Configure a manifest from this addressDeployed on this chain
Hook interface
- Before Create
- Before Accept
- Accepts direct calls
Attachment configuration
Takes no configuration.
About this hook
- 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/42431/0xbb3c27dc89d8d067dd2a499dfc6b7b8800f729e3.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
- tempo-moderato
- Chain ID
- 42431
- Deployment block
- 45060983
- Transaction hash
- 0xac6e232e392a06eb6f22b01b0a5567ca3659f8ecdc49e0632ae1c80eac4e0913
- Runtime codehash
- 0xbac30a6917b6a38aad60af96781cdef75a7e9b5256b052dde052083be5624745
- 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. Derived for Tempo: forge applies Ethereum storage pricing, so each call's gas is raised by 230,000 (Tempo's 250,000 for a slot going from zero to nonzero, less Ethereum's 20,000) for every such slot the callback created. The slot count comes from state-diff recording in the same tests, which does not see writes a callback makes after it has called back into the diamond; for the gating-mode create the maximum is therefore taken from the source, which writes one new slot per gated task, so 788220 + 16 x 230000. This is an estimate built on a measurement, not an execution on Tempo.
beforeCreate: typical 257,819, maximum 4,612,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. Derived for Tempo: forge applies Ethereum storage pricing, so each call's gas is raised by 230,000 (Tempo's 250,000 for a slot going from zero to nonzero, less Ethereum's 20,000) for every such slot the callback created. The slot count comes from state-diff recording in the same tests, which does not see writes a callback makes after it has called back into the diamond; for the gating-mode create the maximum is therefore taken from the source, which writes one new slot per gated task, so 788220 + 16 x 230000. This is an estimate built on a measurement, not an execution on Tempo. The maximum assumes 16 new storage slots (one gating task link per gated task): the slot counter logged none for that frame in this run.
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 42431: verifiedPublisher-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 (tempo-moderato): Diamond proxy that calls this hook's callbacks through onlyDiamond and holds the task state the hook reads.
Observed usage on Taskmarket
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.