Job Escrow
Contract
contract JobEscrow {
struct Job {
address payer;
address payee;
uint256 amount;
bool completed;
}
mapping(uint256 => Job) public jobs;
uint256 public nextJobId;
/// @notice Create a new job and escrow funds.
/// @param payee Address of the service provider.
/// @param amount Amount of tokens to escrow (ERC-20).
function createJob(address payee, uint256 amount) external;
/// @notice Mark a job as completed.
/// Called by the payee or a Brain oracle after verification.
function completeJob(uint256 jobId) external;
/// @notice Release escrowed funds to the payee after completion.
function releaseFunds(uint256 jobId) external;
}Job Lifecycle
Use Cases
Use Case
Description
Integration with Brain Agents
Last updated
