Skip to main content

Crate cow_primitives

Crate cow_primitives 

Source
Expand description

cow-primitives — Layer 0 foundational constants for the CoW Protocol SDK.

This crate sits at the bottom of the workspace DAG and has no internal dependencies. It exposes:

  • Numeric constants (ZERO, ONE, MAX_UINT256, ONE_HUNDRED_BPS, …)
  • The zero address and zero hash helpers
  • Near Intents attestation constants

Protocol enums (OrderKind, SigningScheme, TokenBalance, …) live in cow-types (Layer 1) because their TryFrom<&str> impls depend on cow-errors.

Constants§

ATTESTATION_PREFIX_CONST
Near Intents attestation prefix constant.
ATTESTATOR_ADDRESS
Near Intents attestator address.
ATTESTION_VERSION_BYTE
Near Intents attestation version byte.
HUNDRED_THOUSANDS
Scale factor: 100 000.
LIMIT_CONCURRENT_REQUESTS
Maximum concurrent requests to the CoW Protocol API.
MAX_UINT32
Maximum u32 value as a U256 (2^32 - 1 = 4 294 967 295).
MAX_UINT256
Maximum U256 value (2^256 - 1).
ONE
U256 one.
ONE_HUNDRED_BPS
One hundred basis points expressed as a U256 (100 * 100 = 10 000).
ZERO
U256 zero.
ZERO_ADDRESS
The zero address (0x0000…0000).
ZERO_HASH
The 32-byte zero hash.