EscrowFactory
Write Functions
createEscrow
Creates and funds a new escrow atomically.| Reverts If |
|---|
| Token not whitelisted |
| Amount below minimum |
| Amount above maximum |
| Agent not valid (if specified) |
| Expected address mismatch |
| Insufficient token balance/approval |
View Functions
quoteCreateEscrow
isEscrow
EscrowImplementation
State Variables (Read)
Write Functions
accept
Seller accepts the escrow terms.| Constraint |
|---|
| Caller must be seller |
| State must be PENDING |
| Must be before accept deadline |
decline
Seller declines, refunding buyer.cancelExpired
Buyer cancels after acceptance window.| Constraint |
|---|
| State must be PENDING |
| Accept deadline must have passed |
markFulfilled
Seller marks work as complete.| Constraint |
|---|
| Caller must be seller |
| State must be ACTIVE |
release
Buyer releases funds to seller.| Constraint |
|---|
| Caller must be buyer |
| State must be ACTIVE or FULFILLED |
sellerRefund
Seller refunds 100% to buyer.| Constraint |
|---|
| Caller must be seller |
| State must not be terminal |
claimExpired
Seller claims after protection expires.| Constraint |
|---|
| Caller must be seller |
| State must be FULFILLED |
| Protection time must have expired |
openDispute
Buyer opens a dispute.| Constraint |
|---|
| Caller must be buyer |
| State must be ACTIVE or FULFILLED |
inviteAgent
Either party invites agent.| Constraint |
|---|
| State must be DISPUTED |
| Agent must not be address(0) |
| Agent must still be valid |
claimAgentTimeout
Claim timeout after agent fails to act.| Constraint |
|---|
| State must be AGENT_INVITED |
| 7 days must have passed since invite |
agentResolve
Agent resolves the dispute.| Constraint |
|---|
| Caller must be agent |
| State must be AGENT_INVITED |
| buyerBps + sellerBps == 10000 |