Skip to main content

Architecture

This contract is a simple helper contract that:
  • References the CoW Protocol settlement contract’s domainSeparator.
  • Constructs a Gnosis Protocol v2 (CoW) order data struct on-chain.
  • Determines whether the order is a sell or buy order based on isSell.
  • Computes the EIP-712 hash that matches what the CoW Protocol uses to verify user signatures off-chain.

Data Types and Storage

GPv2SettlementContract

An interface for the CoW Protocol settlement contract.

Functions

getUid

Constructs an order, determines if it is a sell or buy order, then computes the same EIP-712 hash used by CoW Protocol for verifying signatures. Returns both the EIP-712 digest and the ABI-encoded order.
Note: The digest being returned is only the order digest, not the actual order uid. In order to get the order uid this must be concatenated with the address of the order owner and the timestamp until which the order is valid (reference).

Indexing

Nil

Off-chain

Nil
Last modified on March 12, 2026