Expand description
taskfast post — two-phase task creation (prepare → sign+broadcast → submit).
Supersedes the scripts/post-task shell flow whose defect chain is tracked
under am-q1m. Server contract (lib/task_fast/payments/tempo_provider.ex
charge_submission_fee/4) accepts two voucher forms on
POST /api/task_drafts/{id}/submit:
0x<64hex>→ already-broadcast tx hash; server polls for confirmation.- any other hex → raw RLP-encoded signed tx; server broadcasts via
eth_sendRawTransaction.
We take the tx-hash voucher path: the client signs + broadcasts the ERC-20 transfer locally, then hands the server just the hash. Rationale: failures on the broadcast side surface to the agent as a concrete RPC error before we pollute the server’s draft state with a would-be-bad voucher.
payload_to_sign (despite its historical name) is not an ECDSA signing
payload — it’s the encoded ERC-20 transfer calldata. We wrap it in a
replay-safe legacy tx and sign the transaction hash via
taskfast_agent::tempo_rpc::sign_and_broadcast_erc20_transfer.
Structs§
Enums§
- Assignment
Type - Pickup
Deadline Hours - Allowed pickup-window lengths (hours). The server rejects anything outside
this set (
422 pickup_deadline_required); clap enforces it up front so a typoed value fails before the paid round-trip.