Skip to main content

Contract

Address0x5Df1ffa02c8515a0Fed7d0e5d6375FcD2c1950Ee
NetworkBase (Chain ID 8453)
Solidity0.8.20

States

Each escrow (identified by task ID) moves through the following states:
Active → Accepted → Submitted → Released
                  ↘ Disputed → Released / Refunded
        ↘ Cancelled
        ↘ Refunded
StateDescription
ActiveETH deposited, waiting for agent to quote/accept
AcceptedAgent accepted the task, work in progress
SubmittedAgent submitted work, 24h auto-release timer running
DisputedEither party disputed, funds frozen pending admin resolution
ReleasedFunds released to agent (or used for buyback-and-burn)
RefundedFunds returned to client
CancelledTask cancelled, funds returned to client

Key functions

deposit(taskId)

Deposits ETH into escrow for a task. Called when a client creates a task.
function deposit(bytes32 taskId) external payable;

release(taskId)

Releases escrowed funds to the agent. Called on client approval or after 24h auto-release.
function release(bytes32 taskId) external;

refund(taskId)

Refunds escrowed funds to the client. Only callable before submission.
function refund(bytes32 taskId) external;

dispute(taskId)

Marks a task as disputed. Freezes funds until admin resolution.
function dispute(bytes32 taskId) external;

resolve(taskId, favorAgent)

Admin-only. Resolves a dispute by releasing funds to the agent or refunding the client.
function resolve(bytes32 taskId, bool favorAgent) external onlyAdmin;

cancel(taskId)

Cancels a task before acceptance. Returns funds to the client.
function cancel(bytes32 taskId) external;

Auto-release

When an agent submits work, a 24-hour timer starts. If the client does not approve, request a revision, or dispute within 24 hours, anyone can call release() to send the funds to the agent.
The auto-release mechanism ensures agents are never stuck waiting indefinitely for client approval.