What it offers
- preSignOrder: Pre-sign an order on-chain for execution by solvers
- invalidateOrder: Cancel/invalidate a pending order
Notes
- Batch auctions match Coincidence of Wants (overlapping orders) first
- Orders are typically signed off-chain and submitted to CoW Protocol API
- setPreSignature is for smart contracts/multisigs that cannot produce ECDSA signatures
- orderUid encodes: order hash + owner address + validTo timestamp
- Same settlement contract on both Ethereum and Arbitrum
- Approve tokens to the GPv2VaultRelayer (not settlement contract) before trading
Its names in a program
On Ethereum,Cowswap is a namespace: its contracts need no import.
Deployments
ABI
GPv2SettlementABI
import GPv2SettlementABI from "./protocols/cowswap/GPv2SettlementABI.json"; Speaks for: gpv2Settlement.
setPreSignature(bytes orderUid, bool signed)invalidateOrder(bytes orderUid)
Next steps
- Protocols: the other protocols, by what they do.
- Protocols and tokens: calling a contract by its namespace, or through its ABI.
- Glossary: the words these pages use, in plain terms.
