Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Default reviewer for all changes.
* @SebastianBoehler
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ What should have happened?
- Compiler:
- CMake version:
- Install method: FetchContent / release archive / source build
- Network route: direct / proxy (scheme only, no credentials) / bound interface

## Notes

Expand Down
21 changes: 21 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,33 @@ Concurrent work is common. Continue around unrelated changes without resetting,
removing, or reformatting them. When asked to commit all work, review every tracked
and untracked change and create logical commit groups.

## Repository map

| Area | Public headers (`include/polymarket/`) | Implementation (`src/`) |
| --------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| HTTP transport | `http_client.hpp`, `network.hpp` | `http_client*.cpp`, `http_global.cpp`, `network_route.cpp` |
| WebSocket transport | `websocket_client.hpp` | `websocket_client*.cpp`, `websocket_resilience.cpp`, `websocket_tunnel.cpp` |
| CLOB REST and trading | `clob_client.hpp`, `clob_types.hpp`, `geoblock.hpp` | `clob_*.cpp`, `order_execution.cpp`, `order_amounts.cpp`, `geoblock.cpp` |
| Order signing | `order_signer.hpp`, `decimal_math.hpp` | `order_signer*.cpp`, `decimal_math.cpp` |
| Market data streams | `orderbook.hpp`, `types.hpp` | `orderbook*.cpp`, `websocket_market_data.cpp`, `arb_*.cpp` |
| User stream | `user_stream.hpp` | `user_stream*.cpp`, `websocket_user_data.cpp` |
| On-chain positions | `position_client.hpp`, `trading_approvals.hpp`, `evm_*.hpp` | `position_*.cpp`, `approval_calls.cpp`, `safe_relayer.cpp`, `evm_*.cpp` |
| Polygon indexing | `json_rpc_client.hpp`, `evm_event_indexer.hpp`, `oracle_watcher.hpp` | `json_rpc_*.cpp`, `evm_*indexer*.cpp`, `oracle_*.cpp`, `polymarket_events.cpp` |

Tests live in `tests/` (fixtures in `*_fixture.hpp` and `*_test_support.hpp`);
some contract tests live in `src/*_contract_tests.cpp`. Benchmarks live in
`benchmarks/`. `./build.sh` configures, builds, and runs the offline suite.

## Load these references when relevant

- Protocol, signing, transactions, numeric parsing, or stream lifecycle changes:
read [docs/protocol-development.md](docs/protocol-development.md).
- Position operations or wallet support: also read
[docs/position-operations.md](docs/position-operations.md).
- Proxies, interface binding, or WebSocket transport changes: read
[docs/networking.md](docs/networking.md). Routed connections must fail closed.
- Hot-path performance changes: run the matching target in `benchmarks/` before
and after, as described in [docs/benchmarks.md](docs/benchmarks.md).
- Versions, tags, release packages, or publication: read
[docs/releasing.md](docs/releasing.md) and `.github/workflows/release.yml`.
- Test registration and example targets: inspect `cmake/PolymarketTests.cmake`
Expand Down
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@AGENTS.md
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ set(POLYMARKET_CLIENT_SOURCES
src/evm_reorg_reconciliation.cpp
src/evm_utils.cpp
src/gamma_market_fetcher.cpp
src/geoblock.cpp
src/http_client.cpp
src/http_client_connection.cpp
src/http_global.cpp
Expand All @@ -121,13 +122,15 @@ set(POLYMARKET_CLIENT_SOURCES
src/json_rpc_transactions.cpp
src/json_rpc_ws_dispatch.cpp
src/json_rpc_ws_runtime.cpp
src/network_route.cpp
src/websocket_client_callbacks.cpp
src/websocket_client.cpp
src/websocket_client_resilience.cpp
src/websocket_client_teardown.cpp
src/websocket_client_transport.cpp
src/websocket_resilience.cpp
src/websocket_market_data.cpp
src/websocket_tunnel.cpp
src/websocket_user_data.cpp
src/market_fetcher.cpp
src/market_discovery.cpp
Expand Down
5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ of commits.

## Validation

Configure an isolated build directory for the task:
`./build.sh` configures a Release build with examples and tests, builds it, and
runs the offline suite. Set `BUILD_DIR`, `BUILD_TYPE`, `BENCHMARKS=ON`, or
`CMAKE_ARGS` to adjust it. To run the steps yourself, configure an isolated
build directory for the task:

```bash
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
Expand Down
Loading
Loading