Escrow Flow

Step 1: Deploy First Escrow for Testing using Factory Contract
Next Up

Call the EscrowFactory and deploy a new escrow contract instance.

Chain: sepolia
Role: admin
deployEscrow

Select role admin to enable.

Events
Step 2: Dust the Escrow with Gas

Ensure the deployed escrow contract has enough native tokens for bridge callbacks and on-chain operations.

Chain: sepolia
Role: admin
Contract: Escrow
transfer
Current balance: 0 ETH
Events
Step 3: Deploy Test ERC20 Token

A test ERC20 TestToken contract can be deployed to simulate real-world token transfers. This step can be skipped.

Chain: sepolia
Role: admin
Contract: Token
deploy
Events
Step 4a: Approve Tokens

Approve the escrow contract to spend tokens from the buyer address.

Chain: sepolia
Role: buyer
Contract: Token
approve
Events
Step 4b: Deposit Tokens

Deposit approved tokens into escrow from the buyer address.

Chain: sepolia
Role: buyer
Contract: Escrow
deposit
Events
Step 5: Request Adjudication

If there's a dispute, the buyer or seller can request adjudication, putting the escrow into a paused state.

Chain: sepolia
Role: seller or buyer
Contract: Escrow
requestAdjudication()
Events
Step 6: Assign Adjudicator

An adjudicator address (or contract) is assigned to the escrow to take over resolution.

Chain: sepolia
Role: admin
Contract: Adjudicator
assignAdjudicator
Events
Step 7: Confirm Adjudication

The adjudicator must confirm their role and accept responsibility for resolving the dispute.

Chain: sepolia
Role: adjudicator
Contract: Escrow
confirmAdjudication()
Events
Step 8: Issue Ruling

The adjudicator issues a final ruling, sending funds to either party and triggering any optional callbacks.

Chain: sepolia
Role: adjudicator
Contract: Adjudicator
issueRuling
Events
Step 9: Verify Automatic Cleanup & Unsubscription

Reactive subscriptions are automatically cleaned up after resolution. The escrow becomes immutable and inactive.

Chain: sepolia
Role: admin
Contract: Escrow
releaseFunds()
Events