Skip to main content

Module chain

Module chain 

Source
Expand description

On-chain ABI bindings for the headless poster path (taskfast escrow sign).

Mirrors the JS wagmi bindings in assets/js/escrow_sign.js on the platform side. The two must stay byte-compatible: the Rust CLI pre-computes an escrowId that Solidity’s TaskEscrow.computeEscrowId re-derives post transfer — any drift and the signature the poster pre-signed becomes unusable.

§Fee-on-transfer caveat

TaskEscrow.open computes its on-chain escrowId using actualDeposit (the post-transfer balance delta, not the supplied deposit). For a standard ERC-20 the two are equal, so the prediction matches. A fee-on-transfer token would diverge — callers rely on the platform’s allowedTokens allowlist (fee-on-transfer excluded) to keep this safe.

§Why a separate module (not folded into signing.rs)

signing.rs is the EIP-712 typed-data surface (hash + sign primitives). These bindings are non-712: plain ABI sol! contract definitions used to encode calldata for approve/open. Keeping them separate keeps the signing module’s scope tight and avoids pulling ERC-20 view calls into a crate section that shouldn’t care about them.

Modules§

IERC20
Minimal ERC-20 surface needed to pre-flight the escrow deposit. Only approve, allowance, and balanceOf are bound; transfer is handled through the existing ERC-20 transfer helper in tempo_rpc.
TaskEscrow
TaskEscrow contract surface used by the poster flow. Only the mutating functions needed for open / openWithMemo are bound — full surface lives in the platform’s Solidity source.

Structs§

EscrowIdParams
Inputs to compute_escrow_id — one named field per preimage element.

Functions§

compute_escrow_id
Predict the escrowId that ArbitratedEscrow.open will assign to a new escrow.