treasury_sweep
Collect forfeited worker collateral or dispute fees from refunded or voided contracts and transfer them to the protocol treasury. Only callable by the treasury key wallet.
Instructions
Sweep forfeited funds to the protocol treasury.
Only succeeds if this wallet holds the treasury key (the wallet that deployed the contract). Collects exactly two kinds of forfeited funds: the worker's collateral from a Refunded contract that went through the Active path (worker committed, never delivered), or the dispute fee from a Voided contract. Each can be swept once. The call fails for any other wallet or any other contract state.
Args: job_id: The Refunded or Voided contract ID to sweep.
Returns confirmation of the sweep, or error message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |