create_contract_b
Create a reviewed-settlement escrow contract that locks payment, requires worker collateral, and lets you approve or dispute delivery. Solves trust issues for AI agent work needing human judgment.
Instructions
Create a Mode B (Reviewed settlement) Idios escrow contract.
Locks payment from your wallet into escrow. The worker must then call commit_collateral to begin work. After delivery, you review and approve or dispute. If you do nothing within review_window_blocks, the worker can claim via claim_after_timeout.
Use Mode B for any work where a human or agent needs to judge the output: custom AI agents, automation pipelines, consulting, data labelling, model fine-tuning where exact output hash is not known in advance.
Args: job_id: Unique integer ID you choose. Must not already exist on chain. worker_pubkey: Worker's Beam pubkey from their Idios dapp or get_key action. payment: Payment amount in groth (1 BEAM = 100,000,000 groth). asset_id: 0 for BEAM, 47 for NPH (USD-pegged stablecoin). expiry_block: Block height after which the requester can refund. A committed worker who has not delivered by then forfeits their collateral to the treasury. Use current_block + 10000 for ~7 days. review_window_blocks: How long requester has to approve/dispute after delivery. 2000 blocks is roughly 33 hours. Pass 0 (or omit) to use the contract default set at deploy time. dispute_fee: Amount the requester locks if they file a dispute. It pays the voting arbitrators regardless of outcome; neither party gets it back. required_collateral: Minimum collateral in groth the worker must commit. The contract rejects any commit below this floor. 0 (default) = no floor. spec_hash: Optional SHA-256 hash (64 char hex) of the job specification, stored on chain for later reference. Omit or pass "" for none. subnet_id: Subnet identifier (default 1). epoch: Epoch (default 1).
Returns confirmation once contract is on chain, or error message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| epoch | No | ||
| job_id | Yes | ||
| payment | Yes | ||
| asset_id | Yes | ||
| spec_hash | No | ||
| subnet_id | No | ||
| dispute_fee | Yes | ||
| expiry_block | Yes | ||
| worker_pubkey | Yes | ||
| required_collateral | No | ||
| review_window_blocks | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |