TheCompact Protocol
TheCompact is a cross-chain intent execution protocol that enables users to lock tokens and execute operations across multiple chains.Contract Address
From Constants.sol, TheCompact is deployed at the same address across all supported chains:TheCompact uses deterministic deployment (CREATE2) for consistent addresses across chains. Verify the address for your specific chain in the official deployment documentation.
Integration Points
CompactArbiter
The Router integrates with TheCompact through theCompactArbiter contract:
Mandate Hash Computation
From ArbiterBase.sol:207-209:Compact Features
Resource Locks
Lock tokens on origin chain for cross-chain claims
ERC-7683 Standard
Follows cross-chain intent standard
Pre-Claim Operations
Execute setup operations before claim
Gas Stipends
Allocate gas for complex operations
Compact Order Structure
From SameChainAdapter.sol:76-81:Pre-Claim Operations
TheCompact supports pre-claim operations that execute before settlement:Permit2 Protocol
Permit2 is Uniswap’s signature-based token approval system, enabling gasless approvals through signed permits.Contract Address
From Constants.sol:14-15:0x000000000022D473030F116dDEE9F6B43aC78BA3
Integration Points
Permit2Arbiter
From ArbiterBase.sol:33:Permit2 Order Structure
From SameChainAdapter.sol:95-98:Permit2 Features
Gasless Approvals
Users sign permits off-chain instead of on-chain approvals
Batch Transfers
Transfer multiple tokens in a single transaction
Nonce Management
Built-in replay protection via nonces
Expiration
Time-limited permits for security
Permit2 Mandate Hash
From ArbiterBase.sol:275-277:EIP-712 Integration
Permit2 uses EIP-712 structured data signing:Cross-Chain Support
Warp Router supports cross-chain settlements through specialized adapters and arbiters.Same-Chain Settlements
For operations where origin and destination are the same chain:- Pre-fund recipient with output tokens
- Claim input tokens via arbiter
- Execute target operations
- Emit fill event
Cross-Chain Settlements
For operations across different chains:Multi-Element Orders
TheCompact supports multi-element orders for complex cross-chain flows:Direct Routes
Direct routes allow operations without adapter overhead.Single Call
From DirectRoutes.sol:121-127:Multi Call
From DirectRoutes.sol:128-134:Fee Collection
In-router fee collection without delegatecall:Adapter Registry
Adapters are registered using the Router’s adapter management system.Installing Adapters
ADAPTER_ADDER_ROLE from RouterManager.
Adapter Lookup
From RouterLogic.sol:254:Adapter Tags
Adapters can declare special behaviors via tags:setSkipRelayerContext(): Adapter doesn’t consume relayer context- Default tag: Standard adapter behavior
Protocol Compatibility Matrix
| Protocol | Same-Chain | Cross-Chain | Pre-Claim Ops | Gas Stipends |
|---|---|---|---|---|
| TheCompact | ✅ | ✅ | ✅ | ✅ |
| Permit2 | ✅ | ✅ | ✅ | ❌ |
| Direct Routes | ✅ | ❌ | ❌ | ❌ |