Documentation Index
Fetch the complete documentation index at: https://cowswap-mintlify-seo-audit-1777280932.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Creating Orders
Key Concepts
Programmatic orders inComposableCoW rely on the ConditionalOrderParams struct, which incorporates three essential components:
- A handler contract specifying the order type
- A unique salt identifier
- ABI-encoded order parameters (
staticInput)
Core Order Structure
The framework supports multiple handler types:| Handler | Address | Description |
|---|---|---|
| TWAP | 0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5 | Distributes trades across time intervals |
| GoodAfterTime | - | Activates orders after specified timestamps |
| StopLoss | - | Triggers sales when prices fall below strike levels using oracle data |
Implementation Steps
The process involves four main phases:1. Parameter Definition
Configure order-specific data based on your chosen handler type.2. Struct Creation
Wrap parameters inConditionalOrderParams with a unique salt.
3. Token Approval
Authorize the vault relayer (0xC92E8bdf79f0507f65a392b0ab4667716BFE0110) to access required tokens.
4. Order Submission
Execute the creation throughComposableCoW.create() from a Safe contract.
Advanced Features
createWithContext: Store on-chain values via value factories during order creation- Batch operations: Bundle multiple order creations together using MultiSend
- Verification: Confirm successful order creation through the
singleOrdersmapping