Skip to main content

Module post

Module post 

Source
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 broadcast via crate::tempo_session::TempoSession::send_transaction.

Structs§

Args

Enums§

AssignmentType

Functions§

run