Prepare an EWP job-lifecycle step on Base or Robinhood Chain (non-custodial)
prepare_chain_stepBuild the exact unsigned transaction for one step of a real ecological-work job's lifecycle — post, claim, unclaim, prove, approve, reject, cancel, or settle — on the PUBLIC Ecological Work Protocol contract, on Base or on Robinhood Chain. You sign it and broadcast it yourself, from your own wallet, paying your own gas in the chain's native ETH; this server never holds a key, never signs, and never pays. Any wallet, any local society, any amount of gas they are willing to spend: this is how a stranger's own AI runs the whole job loop on the public ledger with no house involved and no house money. Before returning a transaction this tool reads live chain state and refuses with a plain reason when the step would fail — the contract paused, the work in the wrong status, the wallet not allowed to take this action — and as a final check it eth_calls the exact transaction from your wallet address, so a doomed transaction is never handed out. Steps and their extra fields: post (workType, standard, priceUsd, location, expiresInDays) creates a new job — anyone can post; the on-chain WorkType bucket is derived from workType and the rich description lives in standard; price is stored on chain in cents; location is written on chain PUBLICLY and PERMANENTLY. claim / unclaim / cancel / approve / reject (workId) act on an existing job by id. proof (workId, proofHash) records that you finished the work — proofHash is the SHA-256 of your evidence, 64 lowercase hex characters, no 0x prefix: we take a hash, never a file (hash it yourself, or use the free anchor_proof tool). settle (workId, paymentTxHash, tokenContractAddress, tokenId, qualityScore) records that a payment ALREADY happened, on any rail, in any token, at any amount its two parties agreed — pass tokenContractAddress as "native" for a plain ETH payment; this call is a receipt, not a payment, and moves no money by itself. Call chain_work_status first if you are unsure of a job's current state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| step | Yes | The lifecycle action to prepare. | |
| chain | Yes | Which live EWP deployment: "base" (chainId 8453) or "robinhood" (Robinhood Chain, chainId 4663). Same contract bytecode on both. | |
| wallet | Yes | Your OWN 0x… address — the wallet that will sign and pay gas for this transaction. Never send a private key anywhere. | |
| workId | No | Every step except post. The numeric id of the work on THIS chain (from find_work, chain_work_status, or your own post's receipt). | |
| tokenId | No | settle only. An NFT/token id if the payment minted one; empty string otherwise. | |
| location | No | post only. Where the work is. Written on chain PUBLICLY and PERMANENTLY — prefer a neighborhood or city over an exact street address. | |
| priceUsd | No | post only. A positive number of US dollars (e.g. 50 for $50). Stored on chain as cents. | |
| standard | No | post only. The rich, specific description written on chain (e.g. "drinking_water_safety", or a fuller sentence). Defaults to workType if omitted. | |
| workType | No | post only. Free text describing the work (e.g. "soil_sampling", "storm drain inspection") — bucketed into the contract's water/soil/building shelf. | |
| proofHash | No | proof only. The SHA-256 of your evidence: 64 lowercase hex characters, no 0x prefix. | |
| qualityScore | No | settle only. Whole number, 0 to 100. | |
| expiresInDays | No | post only. Whole number, 1 to 365: how many days the posting stays claimable. | |
| paymentTxHash | No | settle only. The transaction hash (or other reference) of a payment that already happened, on any rail. | |
| tokenContractAddress | No | settle only. The token paid with — a 0x… contract address, or the literal "native" for plain ETH. Defaults to "native". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| tool | No | ||
| funded | No | ||
| payUsd | No | ||
| workId | No | ||
| claimId | No | ||
| claimable | No | ||
| next_call | No | ||
| proofRule | No | ||
| fulfillableBy | No | ||
| definitionOfDone | No | ||
| needs_from_caller | No | ||
| notClaimableReason | No |