Skip to main content

Module eip712

Module eip712 

Source
Expand description

EIP-712 order signing for the Polymarket CTF Exchange.

Orders on Polymarket are signed typed structured data (EIP-712) against the CTF Exchange contract on Polygon. Two exchange contracts exist:

Both share the same EIP-712 domain name and version; only the verifyingContract differs.

This module also owns the CLOB V2 contract identities and ordered on-chain approval plan (approval_plan) used by the set-allowances binary.

Structs§

ClobAuth
Order
OrderSigner
EIP-712 order signer for the Polymarket CTF Exchange.

Enums§

PolymarketApproval
One transaction in the Polymarket approval plan.

Constants§

COLLATERAL_APPROVAL_TARGETS
Complete spender set requiring collateral approval for Polymarket CLOB V2 orders.
CONDITIONAL_TOKENS
Conditional Tokens Framework contract address on Polygon mainnet.
CTF_EXCHANGE
CTF Exchange contract address on Polygon mainnet (CLOB V2).
NEG_RISK_CTF_COLLATERAL_ADAPTER
Neg Risk CTF collateral adapter address on Polygon mainnet.
NEG_RISK_CTF_EXCHANGE
Neg Risk CTF Exchange contract address on Polygon mainnet (CLOB V2).
POLYMARKET_COLLATERAL_TOKEN
Polymarket pUSD collateral token contract address on Polygon mainnet.

Functions§

approval_plan
Returns the ordered approval plan for Polymarket CLOB V2.
order_hash
Computes the EIP-712 signing hash used by Polymarket as the order ID.
sign_clob_auth
Signs a ClobAuth EIP-712 message for L1 API authentication.