Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: uniswap-python/uniswap-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.8.0
Choose a base ref
...
head repository: uniswap-python/uniswap-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 15 commits
  • 46 files changed
  • 4 contributors

Commits on Aug 5, 2026

  1. docs: disclose project funding history in README (#476)

    Replaces the stale 'Support our continued work' Gitcoin CTA with a
    Funding section covering the Uniswap Grants Program grant (v3, 2021),
    community Gitcoin donations, and Superuser Labs' sponsorship of
    continued development including the v4 work.
    ErikBjare authored Aug 5, 2026
    Configuration menu
    Copy the full SHA
    56ba3eb View commit details
    Browse the repository at this point in the history
  2. fix(deps): bump lru-dict to 1.2.0 in lockfile for Python 3.13 (#475)

    lru-dict 1.1.8 ships no wheels for recent Python and its source fails
    to compile under modern clang (incompatible-function-pointer-types on
    the popitem method table; amitdev/lru-dict#76), breaking
    'poetry install' on Python 3.13. 1.2.0 contains the fix and stays
    within web3 6.x's 'lru-dict <1.3.0' constraint.
    ErikBjare authored Aug 5, 2026
    Configuration menu
    Copy the full SHA
    bc8fdf4 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2026

  1. feat(metrics): adoption baseline snapshot script + daily workflow (UF…

    … grant D3/D4) (#480)
    
    * feat(metrics): adoption baseline snapshot script and daily workflow
    
    Adds scripts/adoption_snapshot.py (stdlib-only) that captures:
    - GitHub stars, forks, watchers, open issues
    - GitHub Traffic: clones/views (14-day window; requires push-access token
      — the bundled GH Actions workflow captures this automatically)
    - PyPI downloads last day/week/month (pypistats.org)
    - Recent release versions and dates
    
    Modes:
      Snapshot (default): emits metrics/adoption-YYYY-MM-DD.{json,md}
      Report (--report BASELINE.json): prints deltas vs baseline for D4
    
    Also adds .github/workflows/adoption-snapshot.yml (daily at 06:00 UTC)
    that runs with the repo's GITHUB_TOKEN so traffic data accumulates before
    the 14-day window rolls off.
    
    Initial bootstrap snapshot included (2026-09-02): 1011 stars, 375 forks,
    1044 PyPI downloads/month.
    
    Per-version download splits require BigQuery (documented in script TODO).
    
    Co-authored-by: Erik Bjäreholt <erik@bjareho.lt>
    Git-Session-Id: 3b38
    
    * fix(metrics): fail closed on traffic auth and collector errors
    
    The default Actions GITHUB_TOKEN cannot read /traffic/* (always 403).
    The workflow now prefers ADOPTION_GITHUB_TOKEN (PAT), runs --strict so
    failed/skipped collectors do not commit N/A snapshots, retries 429s,
    and includes traffic deltas in --report. Push path rebases on conflict.
    
    * test: xfail v1 UNI-exchange price-output cases (no liquidity)
    
    Same fix as #479 — the v1 UNI exchange has no remaining liquidity so
    get_price_output raises EVM error InvalidJump on mainnet fork.
    
    Git-Session-Id: 8f77
    
    * fix(metrics): reconstruct traffic period totals from daily series
    
    GitHub Traffic is a rolling 14-day window, not a cumulative counter.
    Subtracting two windows produced misleading D4 deltas. Store the daily
    breakdown (per=day) and union it across snapshots for period clone/view
    counts. Unique visitors stay point-in-time — they are not additive.
    
    * fix(metrics): exclude partial current UTC day from period totals
    
    Report mode included today's still-accumulating GitHub Traffic row in
    D4 period totals, understating clones/views on every 06:00 UTC run.
    Drop that day from the reconstructed range and label it excluded.
    
    * fix(metrics): pin collection clock so midnight cannot include a partial day
    
    complete_period_end() re-read datetime.now() after collect_metrics() had
    already stamped snapshot_at. A report that started before UTC midnight and
    finished after kept the earlier snapshot day, skipped exclusion, and
    published that day's still-accumulating Traffic row as a complete total.
    
    Use one collected_at for snapshot_at, the filename, and period-end
    exclusion. When now is omitted, key off the snapshot day rather than a
    fresh clock.
    
    ---------
    
    Co-authored-by: Erik Bjäreholt <erik@bjareho.lt>
    TimeToBuildBob and ErikBjare authored Oct 12, 2026
    Configuration menu
    Copy the full SHA
    43420bc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    de4e08d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2ac1b83 View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2026

  1. Configuration menu
    Copy the full SHA
    c96d1b0 View commit details
    Browse the repository at this point in the history
  2. test(v4): poll Anvil startup instead of a fixed sleep (#486)

    * test(v4): poll Anvil startup instead of a fixed sleep
    
    Both v4 test modules started anvil and then slept 3 seconds before
    connecting. On a slow fork that is not enough and the matrix fails with
    ConnectionRefusedError; on a fast machine it wastes time; and when anvil
    dies at genesis the fixture still waits out the sleep and then fails on
    the connection instead of the real cause.
    
    Poll the RPC port for up to 60s, fail immediately with the exit code if
    the process exits first, and kill it on timeout.
    
    Git-Session-Id: 9d44438c-8705-491c-9930-947968df9a94
    
    * fix(tests): reap timed-out Anvil and use monotonic deadlines
    
    Git-Session-Id: 0fead8e2-e37e-58e4-b158-56598d831c9d
    TimeToBuildBob authored Oct 13, 2026
    Configuration menu
    Copy the full SHA
    aa2c09a View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2026

  1. Configuration menu
    Copy the full SHA
    2e5aee3 View commit details
    Browse the repository at this point in the history
  2. feat(v4): UF grant work — async clients, ReservesLens, CI/test fixes …

    …(clean branch) (#491)
    
    * feat(v4): UF grant work — async clients, ReservesLens, CI/test fixes
    
    Clean branch off master containing liquid-8's changes from dev/v4-fin:
    - Async Uniswap v2/v3/v4 clients (asyncuniswap.py, asyncuniswap4.py)
    - ReservesLens support and getPoolTVLBatch improvements
    - Universal Router and single/multi-hop swap fixes
    - Test suite fixes (RPC switch, Anvil startup, fixture fixes)
    - Adoption metrics snapshot script + daily workflow (UF grant D3/D4)
    - README updates
    
    Clean squash of dev/v4-fin changes reapplied on top of current master,
    resolving the 244-commit ancestry confusion from the original v4-fin
    squash merge (4c42f1f). Also fixes duplicate Generator import in
    tests/test_uniswap.py (ruff F811).
    
    Git-Session-Id: 15b18137-18fa-53a4-92e2-759ce27705c7
    
    * fix: address Greptile P1/P2 findings from review
    
    - Restore @check_approval on make_trade/make_trade_output/add_liquidity/
      remove_liquidity (P1: first token trades fail without router allowance)
    - Remove path overwrite after cost calculation in V2 exact-output branch
      (P1: custom route was silently replaced with default WETH route)
    - Raise ValueError when V3 route is given without fees in get_price and
      make_trade (P1: incomplete routes silently fell back to single-pool quote)
    - Fix async client init to derive provider URL from supplied AsyncWeb3
      so PROVIDER env var is not required when web3 is given (P1)
    - Add asyncio.Lock (_nonce_lock) in AsyncUniswap4 and reserve nonce
      inside the lock before yielding to prevent concurrent trades sharing
      a nonce (P1)
    - Remove incorrect await on bytes32 _name.decode()/_symbol.decode() in
      AsyncUniswap4.get_token — decode() returns str, not awaitable (P2)
    - Restore Anvil startup readiness poll in test_uniswap4.py fixture,
      replacing sleep(3) that was reverted from #486 (P2)
    - Cache get_weth_address result per client instance to avoid repeated
      RPC calls on every quote/swap path (P2)
    
    Co-Authored-By: Bob <bob@superuserlabs.org>
    Git-Session-Id: d44b7f42-192e-588b-98db-435d6ad11d1c
    
    * fix(typecheck): remove unused type: ignore[return-value] on get_weth_address
    
    _weth_address_cache is typed as ChecksumAddress (same as return type),
    so the ignore comment is now redundant and mypy correctly flags it.
    
    Git-Session-Id: c95ac4a4-64bd-42b3-9f79-c55ca4dfb9cf
    TimeToBuildBob authored Oct 14, 2026
    Configuration menu
    Copy the full SHA
    02c0368 View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2026

  1. Configuration menu
    Copy the full SHA
    346767c View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2026

  1. Configuration menu
    Copy the full SHA
    d0a100e View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2026

  1. Configuration menu
    Copy the full SHA
    a3ca335 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2026

  1. Configuration menu
    Copy the full SHA
    9d81d95 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2026

  1. Configuration menu
    Copy the full SHA
    0ab3059 View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2026

  1. Configuration menu
    Copy the full SHA
    58c0bf2 View commit details
    Browse the repository at this point in the history
Loading