Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 1.42 KB

File metadata and controls

50 lines (39 loc) · 1.42 KB

Contributing

Thank you for your interest in polymarket-sdk-cpp!

Getting Started

git clone https://github.com/Wammero/polymarket-sdk-cpp.git
cd polymarket-sdk-cpp
cmake -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build -j$(nproc)
ctest --test-dir build --output-on-failure

Pull Requests

  1. Fork the repo and create a feature branch from main
  2. Add tests for any new functionality
  3. Ensure all existing tests pass: ctest --test-dir build
  4. Run with sanitizers before submitting:
    cmake -B build-asan -DCMAKE_BUILD_TYPE=Debug -DPOLYMARKET_ENABLE_ASAN=ON
    cmake --build build-asan -j$(nproc)
    ctest --test-dir build-asan
  5. Keep commits focused — one logical change per PR

Code Style

  • C++23, no exceptions across API boundaries (use Result<T>)
  • Header-only where possible (except ws_client.cpp)
  • No raw new/delete — use Arena, SmallVector, RAII
  • No std::cout — use printf in examples
  • Match existing patterns in the codebase

Testing

  • Unit tests: tests/unit/ — no network, fast, deterministic
  • Integration tests: tests/integration/test_api.cpp — uses Python mock server
  • Live smoke tests: tests/integration/test_live_api.cpp — read-only prod queries
    POLYMARKET_LIVE_TESTS=1 ./build/tests/test_live_api

Reporting Issues

Open an issue with:

  • What you expected vs what happened
  • Minimal reproduction steps
  • Compiler version and OS