Skip to main content

Module types

Module types 

Source
Expand description

App-data document types for CoW Protocol order metadata.

This module defines the Rust types that mirror the CoW Protocol’s app-data JSON schema (currently v1.14.0). Every type serialises to / deserialises from camelCase JSON via serde, matching the on-chain format exactly.

§Type overview

TypeRole
AppDataDocRoot document — version, app code, metadata
MetadataContainer for all optional metadata fields
OrderClassKindmarket / limit / liquidity / twap
CowHookPre- or post-settlement interaction hook
PartnerFeeSingle or multi-entry partner fee policy
QuoteSlippage tolerance embedded in the order
ReferrerPartner referral tracking address
UtmUTM campaign tracking parameters
BridgingCross-chain bridge metadata
FlashloanFlash loan execution metadata

Structs§

AppDataDoc
Root document for CoW Protocol order app-data (schema v1.14.0).
Bridging
Cross-chain bridging metadata.
CowHook
A single CoW Protocol pre- or post-settlement interaction hook.
Flashloan
Flash loan metadata.
Metadata
Metadata container — all fields are optional.
OrderClass
Wrapper for OrderClassKind as it appears in the metadata schema.
OrderInteractionHooks
Pre- and post-settlement interaction hooks.
PartnerFeeEntry
A single partner fee policy entry (schema v1.14.0).
Quote
Quote-level slippage settings embedded in app-data.
ReplacedOrder
Links this order to a previously submitted order it supersedes.
UserConsent
User acceptance record for terms of service.
Utm
UTM campaign tracking parameters.
Widget
Widget integration metadata.
WrapperEntry
A single token wrapper entry.

Enums§

OrderClassKind
High-level classification of the order’s intent.
PartnerFee
Partner fee attached to a CoW Protocol order (schema v1.14.0).
Referrer
Partner referral tracking information.

Constants§

LATEST_APP_DATA_VERSION
Latest app-data schema version this crate targets.
LATEST_HOOKS_METADATA_VERSION
Latest version of the hooks metadata schema.
LATEST_ORDER_CLASS_METADATA_VERSION
Latest version of the order class metadata schema.
LATEST_PARTNER_FEE_METADATA_VERSION
Latest version of the partner fee metadata schema.
LATEST_QUOTE_METADATA_VERSION
Latest version of the quote metadata schema.
LATEST_REFERRER_METADATA_VERSION
Latest version of the referrer metadata schema.
LATEST_REPLACED_ORDER_METADATA_VERSION
Latest version of the replaced order metadata schema.
LATEST_SIGNER_METADATA_VERSION
Latest version of the signer metadata schema.
LATEST_USER_CONSENTS_METADATA_VERSION
Latest version of the user consents metadata schema.
LATEST_UTM_METADATA_VERSION
Latest version of the UTM metadata schema.
LATEST_WIDGET_METADATA_VERSION
Latest version of the widget metadata schema.
LATEST_WRAPPERS_METADATA_VERSION
Latest version of the wrappers metadata schema.

Functions§

get_partner_fee_bps
Extract the first volumeBps value from an optional PartnerFee.