1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! V2 contract addresses and constants for Polymarket on Polygon (chain 137).
use NEG_RISK_ADAPTER;
pub const V2_CLOB_HOST: &str = "https://clob-v2.polymarket.com";
// V2 Exchange contracts
pub const V2_CTF_EXCHANGE: &str = "0xe111180000d2663c0091e4f400237545b87b996b";
pub const V2_NEG_RISK_EXCHANGE_A: &str = "0xe2222d279d744050d28e00520010520000310f59";
pub const V2_NEG_RISK_EXCHANGE_B: &str = "0xe2222d002000ba0053cef3375333610f64600036";
// V2 Collateral
pub const POLY_USD: &str = "0xc011a7e12a19f7b1f670d46f03b03f3342e82dfb";
pub const COLLATERAL_ONRAMP: &str = "0x93070a847efef7f70739046a929d47a521f5b8ee";
pub const COLLATERAL_OFFRAMP: &str = "0x2957922eb93258b93368531d39facca3b4dc5854";
// V2 uses same CT, Safe, Proxy contracts as V1
// pub const CTF: same as V1
// pub const SAFE_FACTORY: same as V1
// pub const PROXY_FACTORY: same as V1
// V2 spenders that need pUSD approval.
// Order matters: [0..2] are the three spenders the V2 CLOB validates during order placement.
// [0] V2_CTF_EXCHANGE — standard market orders
// [1] V2_NEG_RISK_EXCHANGE_A — neg-risk market orders
// [2] NEG_RISK_ADAPTER (V1!) — V2 neg-risk delegates settlement to V1 NRA, so the CLOB requires
// pUSD allowance here even though it's a V1 contract. Without this,
// every order fails with "not enough balance / allowance".
// [3] V2_NEG_RISK_EXCHANGE_B — reserved variant
pub const V2_SPENDERS: = ;
// EIP-712 domain version
pub const V2_DOMAIN_VERSION: &str = "2";
pub const V2_DOMAIN_NAME: &str = "Polymarket CTF Exchange";
// ORDER_TYPEHASH for V2: keccak256("Order(uint256 salt,address maker,address signer,
// uint256 tokenId,uint256 makerAmount,uint256 takerAmount,uint8 side,
// uint8 signatureType,uint256 timestamp,bytes32 metadata,bytes32 builder)")
pub const V2_ORDER_TYPEHASH: &str = "0xbb86318a2138f5fa8ae32fbe8e659f8fcf13cc6ae4014a707893055433818589";