Polymarket.Clob.Contracts (Polymarket v0.1.1)

Copy Markdown View Source

On-chain contract addresses for the Polymarket CTF Exchange, keyed by chain and by whether the market is a negative-risk market.

Only the data needed to sign and post V2 orders is included: the V2 exchange, which is the EIP-712 "verifying contract". Polymarket runs on Polygon mainnet (chain id 137); Amoy (80002) is its testnet. A market's neg_risk? flag selects a different exchange deployment, so it is part of the key.

Addresses (from the reference rs-clob-client-v2) are stored as raw 20-byte binaries, ready to feed into EIP-712 encoding.

Summary

Functions

Returns the 20-byte V2 exchange ("verifying contract") address for chain_id and neg_risk?, or :error for an unsupported chain.

Functions

exchange_v2(chain_id, neg_risk?)

@spec exchange_v2(integer(), boolean()) :: {:ok, <<_::160>>} | :error

Returns the 20-byte V2 exchange ("verifying contract") address for chain_id and neg_risk?, or :error for an unsupported chain.