Escrow contract
All robopay users share one escrow contract per network. It is deployed once, verified, and its source is readable on Basescan.
Network |
Address |
|---|---|
Base mainnet |
|
Base Sepolia |
USDC token addresses used by robopay:
Network |
USDC |
|---|---|
Base mainnet |
|
Base Sepolia |
|
Functions
open(payee, token, amount, deadline, terms, nonce) returns (bytes32 id)Lock
amountoftokenforpayeeuntildeadline. The token must be on the allowlist. The id is a hash of the chain, contract, payer, and every argument, so no one can claim an id before you.release(id, payerSig, payeeSig)Pay the payee. Both signatures must be valid EIP-712 signatures over the escrow’s contents. Smart contract wallets are supported through EIP-1271.
refund(id)After the deadline, return the funds to the payer. Callable by anyone; funds can only go to the payer.
releaseDigest(id) viewThe exact digest both parties sign.
escrows(id) viewPayer, state, payee, token, amount, deadline, and terms of an escrow.
Signed message
Release(bytes32 id, address payee, address token, uint256 amount,
uint256 deadline, bytes32 terms)
Domain: name RobopayEscrow, version 1, the chain id, and the contract
address. A signature is therefore valid for one escrow, on one contract, on
one network.
Events
Opened(id, payer, payee, token, amount, deadline, terms),
Released(id, payee, amount), Refunded(id, payer, amount).
Admin role
The deployer holds an admin role with one power: adding or removing tokens from the allowlist. It cannot move, freeze, or redirect escrowed funds, and it cannot block releases or refunds of existing escrows. The role is permanent in this version.